Return-Path: Delivered-To: apmail-maven-issues-archive@minotaur.apache.org Received: (qmail 21127 invoked from network); 23 Apr 2009 14:50:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Apr 2009 14:50:14 -0000 Received: (qmail 53983 invoked by uid 500); 23 Apr 2009 14:50:13 -0000 Delivered-To: apmail-maven-issues-archive@maven.apache.org Received: (qmail 53910 invoked by uid 500); 23 Apr 2009 14:50:13 -0000 Mailing-List: contact issues-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list issues@maven.apache.org Received: (qmail 53900 invoked by uid 99); 23 Apr 2009 14:50:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Apr 2009 14:50:13 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [63.246.2.115] (HELO codehaus01.managed.contegix.com) (63.246.2.115) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Apr 2009 14:50:05 +0000 Received: from codehaus01.managed.contegix.com (localhost.localdomain [127.0.0.1]) by codehaus01.managed.contegix.com (Postfix) with ESMTP id E8F2B14A81A2 for ; Thu, 23 Apr 2009 09:49:44 -0500 (CDT) Message-ID: <19839009.47401240498184942.JavaMail.haus-jira@codehaus01.managed.contegix.com> Date: Thu, 23 Apr 2009 09:49:44 -0500 (CDT) From: "Arnaud Heritier (JIRA)" To: issues@maven.apache.org Subject: [jira] Commented: (MNG-4142) Maven doesn't try to download a dependency when it already exists a version with classifier locally In-Reply-To: <17344300.47011240496985055.JavaMail.haus-jira@codehaus01.managed.contegix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 4e90ceb663894a42f12c0e28abbab431 X-Virus-Checked: Checked by ClamAV on apache.org [ http://jira.codehaus.org/browse/MNG-4142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=174038#action_174038 ] Arnaud Heritier commented on MNG-4142: -------------------------------------- Something else to add : If I launch after the site build, another build which doesn't produce the main artefact (for example : mvn sonar), it will also fail trying to download dependency. I think that it can be related to maven-metadata and more probably to the maven maven-metadata-local.xml which is generated. After the mvn site, I have in my local repository in org\apache\maven\it\test-metadata-local-clover\module1\1.0.0-SNAPSHOT: {code} maven-metadata-central.xml maven-metadata-local.xml maven-metadata-remote-repo.xml maven-metadata-remote-repo.xml.sha1 module1-1.0.0-SNAPSHOT-clover.jar module1-1.0.0-SNAPSHOT.pom {code} and in each metadata file : * maven-metadata-central.xml {code} org.apache.maven.it.test-metadata-local-clover module1 1.0.0-SNAPSHOT {code} * maven-metadata-local.xml {code} org.apache.maven.it.test-metadata-local-clover module1 1.0.0-SNAPSHOT true 20090423144418 {code} * maven-metadata-remote-repo.xml {code} org.apache.maven.it.test-metadata-local-clover module1 1.0.0-SNAPSHOT 20090423.140624 1 20090423140625 {code} Do you think that maven-metadata-local.xml is good ? It says that there's a local copy whereas there's no module1-1.0.0-SNAPSHOT.jar in the directory. > Maven doesn't try to download a dependency when it already exists a version with classifier locally > --------------------------------------------------------------------------------------------------- > > Key: MNG-4142 > URL: http://jira.codehaus.org/browse/MNG-4142 > Project: Maven 2 > Issue Type: Bug > Components: Dependencies > Affects Versions: 2.0.9, 2.0.10, 2.1.0 > Environment: Java 5, Windows XP > Reporter: Arnaud Heritier > Priority: Critical > Attachments: test-metadata-local-clover.zip > > > When maven installs in the local repository an artifact with a classifier, and not the principal artifact, it won't try in a reactor to download the principal artifact from the remote repository. > I created a testcase to reproduce it. It's quite simple. You unzip it and in the root directory you launch {code}mvn site{code} > This build uses clover, thus it installs locally cloverified versions of artifacts. > The build will fail because it doesn't find the SNAPSHOT of the module1 : > {code} > [INFO] ------------------------------------------------------------------------ > [ERROR] BUILD ERROR > [INFO] ------------------------------------------------------------------------ > [INFO] Failed to resolve artifact. > Missing: > ---------- > 1) org.apache.maven.it.test-metadata-local-clover:module1:jar:1.0.0-SNAPSHOT > Try downloading the file manually from the project website. > Then, install it using the command: > mvn install:install-file -DgroupId=org.apache.maven.it.test-metadata-local-clover -DartifactId=module1 -Dversion=1.0.0-SNAPSHOT -Dpackaging=jar -Dfile=/pa > th/to/file > Alternatively, if you host your own repository you can deploy the file there: > mvn deploy:deploy-file -DgroupId=org.apache.maven.it.test-metadata-local-clover -DartifactId=module1 -Dversion=1.0.0-SNAPSHOT -Dpackaging=jar -Dfile=/path > /to/file -Durl=[url] -DrepositoryId=[id] > Path to dependency: > 1) org.apache.maven.it.test-metadata-local-clover:module2:jar:1.0.0-SNAPSHOT > 2) org.apache.maven.it.test-metadata-local-clover:module1:jar:1.0.0-SNAPSHOT > ---------- > 1 required artifact is missing. > for artifact: > org.apache.maven.it.test-metadata-local-clover:module2:jar:1.0.0-SNAPSHOT > from the specified remote repositories: > central (http://maven-proxy.groupe.generali.fr/all), > remote-repo (file://E:\jtb\workspaces\tests\test-metadata-local-clover/remote-repo) > {code} > It's anormal because I set a "local" remote repository in the build where it should try to download it. > You can validate that it is working by launching : > {code}mvn install -f module2/pom.xml{code} > This bug is really annoying for us. It exists for a long long time now. I thought it was due to a problem with metadata sent by archiva, but after migrating to nexus the problem always occurs. > I don't know if the problem is in metadata or in the reactor itself. I think it is the second one. There are many issues opened about the reactor and classifiers. > Is there some who can try if it can reproduce the error with my testcase ? > It should be easy to create a real IT for maven with it if it is necessary. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira