How to Fix Maven Artifacts Could not be Resolved Error ...
文章推薦指數: 80 %
I executed below command to install it in my localhost maven repo and everything worked. ... Could not resolve dependencies for project ...
SkiptomaincontentSkiptoprimarysidebarSkiptofooterAdditionalmenu
Advertisement
Irememberlongtimeago,IfacedthesameerrorandItriedfixing itbymanuallyadding.jarfilestomymavenrepositorylocally.
Iexecutedbelowcommandtoinstallitinmylocalhostmavenrepoandeverythingworked.
12345678
#echo"installingjmxri1.2.1"mvninstall:install-file-Dfile=lib/jmxri-1.2.1.jar-DgroupId=com.sun.jmx-DartifactId=jmxri-Dversion=1.2.1-Dpackaging=jar #echo"installingjmxtools1.2.1"mvninstall:install-file-Dfile=lib/jmxtools-1.2.1.jar-DgroupId=com.sun.jdmk-DartifactId=jmxtools-Dversion=1.2.1-Dpackaging=jar #echo"installingjms1.1"mvninstall:install-file-Dfile=lib/jms-1.1.jar-DgroupId=javax.jms-DartifactId=jms-Dversion=1.1-Dpackaging=jar
Jarfileswillbeinstalledatprovidedlocationonceyouexecuteabovecommand:
ButIdidn’ttrytofixthispermanently.RecentlyIchangedmylaptopandagainIstartedseeingtheissueasseenbelowasallmymanuallyinsertedjarfilesweregone.
1234567891011
Thefollowingartifactscouldnotberesolved:javax.jms:jms:jar:1.1,com.sun.jdmk:jmxtools:jar:1.2.1,com.sun.jmx:jmxri:jar:1.2.1:Couldnottransferartifactjavax.jms:jms:jar:1.1from/tojava.net(https://maven-repository.dev.java.net/nonav/repository):Cannotaccesshttps://maven-repository.dev.java.net/nonav/repositorywithtypelegacyusingtheavailableconnectorfactories:BasicRepositoryConnectorFactory:Cannotaccesshttps://maven-repository.dev.java.net/nonav/repositorywithtypelegacyusingtheavailablelayoutfactories:Maven2RepositoryLayoutFactory:Unsupportedrepositorylayoutlegacy->[Help1] org.apache.maven.lifecycle.LifecycleExecutionException:Failedtoexecutegoalonprojectcrunchify-tutorial:Couldnotresolvedependenciesforprojectcrunchify.com.tutorial:crunchify-tutorial:jar:1.0.0-SNAPSHOT:Thefollowingartifactscouldnotberesolved:javax.jms:jms:jar:1.1,com.sun.jdmk:jmxtools:jar:1.2.1,com.sun.jmx:jmxri:jar:1.2.1:Couldnottransferartifactjavax.jms:jms:jar:1.1from/tojava.net(https://maven-repository.dev.java.net/nonav/repository):Cannotaccesshttps://maven-repository.dev.java.net/nonav/repositorywithtypelegacyusingtheavailableconnectorfactories:BasicRepositoryConnectorFactory
AfterdiggingfurtherIfoundthat,inmyJavaProjectIwasusing1.2.15log4jdependencies.
12345
延伸文章資訊
- 1Working with Maven dependencies not found in public ...
Use a corporate repository manager such as Nexus or Artifactory · Use a dependency with system sc...
- 2dependency resolution - Maven fails to find local artifact
This means that there's no local repository used when resolving dependencies (though your install...
- 3Force Repository Update with Maven - Baeldung
Therefore, the download into our local repository is necessary to access all needed code at ... C...
- 4Solved: Could not resolve dependencies for project - Failu...
See this note too: UberJar and the other related artifacts are available on Maven Central Reposit...
- 5How to resolve the common “resolution will not be reattempted ...
The following artifacts could not be resolved: <artifact>: Failure to find <artifact> in https://...