You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (JIRA)" <ji...@apache.org> on 2016/10/15 19:55:20 UTC

[jira] [Closed] (MNG-5706) Maven 3.0.4 and later versions cannot find artifact in repos declared in settings.xml

     [ https://issues.apache.org/jira/browse/MNG-5706?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Osipov closed MNG-5706.
-------------------------------
    Resolution: Works for Me

I can confirm that the sample project fails with 3.0.5 but it works with 3.2.5, 3.3.9 and 3.4.0-SNAPSHOT. Since nothing below 3.3.x is supported anymore, closing as works for me.

> Maven 3.0.4 and later versions cannot find artifact in repos declared in settings.xml
> -------------------------------------------------------------------------------------
>
>                 Key: MNG-5706
>                 URL: https://issues.apache.org/jira/browse/MNG-5706
>             Project: Maven
>          Issue Type: Bug
>          Components: Dependencies
>    Affects Versions: 3.0.4, 3.0.5, 3.1.0, 3.1.1, 3.2.1, 3.2.2, 3.2.3
>         Environment: bash-4.1$ echo $JAVA_HOME
> /developer/tools1/jdk1.7.0_45-Linux-x86_64
> bash-4.1$ which java
> /developer/tools1/jdk1.7.0_45-Linux-x86_64/bin/java
> bash-4.1$ uname -ra
> Linux klw1209.bridgewatersys.com 2.6.32-431.el6.x86_64 #1 SMP Sun Nov 10 22:19:54 EST 2013 x86_64 x86_64 x86_64 GNU/Linux
> bash-4.1$
>            Reporter: Fadel Wanssa
>         Attachments: log-maven.3.0.3, log-maven.3.0.4, log-maven.3.2.3, pom.xml, settings.xml
>
>
> After upgrade from maven 3.0.3 to maven 3.0.4 (tried all versions after 3.0.4), maven cannot resolve dependencies on antlr-runtime.
> We are getting the following error:
> {noformat}
> [DEBUG] Skipped remote update check for org.antlr:ST4:jar:4.0.7, locally cached artifact up-to-date.
> [DEBUG] Using connector WagonRepositoryConnector with priority 0.0 for http://nexus.bridgewatersys.com/nexus/content/groups/acb1-third-party/
> [INFO] Downloading: http://nexus.bridgewatersys.com/nexus/content/groups/acb1-third-party/org/antlr/antlr-runtime/3.5/antlr-runtime-3.5.jar
> [INFO] Downloading: http://nexus.bridgewatersys.com/nexus/content/groups/acb1-third-party/org/antlr/stringtemplate/3.2.1/stringtemplate-3.2.1.jar
> [INFO] Downloading: http://nexus.bridgewatersys.com/nexus/content/groups/acb1-third-party/antlr/antlr/2.7.7/antlr-2.7.7.jar
> [INFO] Downloaded: http://nexus.bridgewatersys.com/nexus/content/groups/acb1-third-party/antlr/antlr/2.7.7/antlr-2.7.7.jar (0 B at 0.0 KB/sec)
> [DEBUG] Writing tracking file /users1/fadlw/maven-test/mvn_repo/org/antlr/antlr-runtime/3.5/antlr-runtime-3.5.jar.lastUpdated
> [DEBUG] Writing tracking file /users1/fadlw/maven-test/mvn_repo/org/antlr/stringtemplate/3.2.1/stringtemplate-3.2.1.jar.lastUpdated
> [DEBUG] Writing tracking file /users1/fadlw/maven-test/mvn_repo/antlr/antlr/2.7.7/antlr-2.7.7.jar.lastUpdated
> [DEBUG] Writing tracking file /users1/fadlw/maven-test/mvn_repo/antlr/antlr/2.7.7/_remote.repositories
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 4.452 s
> [INFO] Finished at: 2014-10-23T10:13:49-04:00
> [INFO] Final Memory: 6M/149M
> [INFO] ------------------------------------------------------------------------
> [ERROR] Failed to execute goal org.antlr:antlr3-maven-plugin:3.5:antlr (default) on project test: Execution default of goal org.antlr:antlr3-maven-plugin:3.5:antlr failed: Plugin org.antlr:antlr3-maven-plugin:3.5 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.antlr:antlr-runtime:jar:3.5, org.antlr:stringtemplate:jar:3.2.1: Could not find artifact org.antlr:antlr-runtime:jar:3.5 in nexus-public (http://nexus.bridgewatersys.com/nexus/content/groups/acb1-third-party/) -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.antlr:antlr3-maven-plugin:3.5:antlr (default) on project test: Execution default of goal org.antlr:antlr3-maven-plugin:3.5:antlr failed: Plugin org.antlr:antlr3-maven-plugin:3.5 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.antlr:antlr-runtime:jar:3.5, org.antlr:stringtemplate:jar:3.2.1: Could not find artifact org.antlr:antlr-runtime:jar:3.5 in nexus-public (http://nexus.bridgewatersys.com/nexus/content/groups/acb1-third-party/)
> {noformat}
> We have a mirror defined in our pom.xml file:
> {noformat}
>   <mirrors>
>     <mirror>
>       <id>nexus-public</id>
>       <mirrorOf>*,!bwc-nexus-snapshots,!bwc-nexus-artifacts,!bwc-nexus-plugins,!bwc-nexus-3rdParty</mirrorOf>
>       <url>http://nexus.bridgewatersys.com/nexus/content/groups/acb1-third-party/</url>
>     </mirror>
>   </mirrors>
> {noformat}
> and it seems that maven 3.0.4 and later are not picking up the artifact from "bwc-nexus-artifacts" repo defined in the settings.xml, but it is defaulting to the http://nexus.bridgewatersys.com/nexus/content/groups/acb1-third-party repo declared in the mirror.
> i attached my pom.xml and settings.xml files, and debug logs produced by maven 3.0.3 and maven 3.2.3.
> Commands i used to build are:
> 3.0.3: /tmp/apache-maven-3.0.3/bin/mvn -Dmaven.repo.local=mvn_repo -s ./settings.xml compile -X | tee log-maven.3.0.3 2>&1
> 3.2.3: /tmp/apache-maven-3.0.3/bin/mvn -Dmaven.repo.local=mvn_repo -s ./settings.xml compile -X | tee log-maven.3.0.3 2>&1
> 3.0.4: /tmp/apache-maven-3.0.4/bin/mvn -Dmaven.repo.local=mvn_repo -s ./settings.xml compile -X | tee log-maven.3.0.4 2>&1



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)