Return-Path: Delivered-To: apmail-maven-issues-archive@minotaur.apache.org Received: (qmail 22731 invoked from network); 29 Mar 2010 20:15:48 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 29 Mar 2010 20:15:48 -0000 Received: (qmail 68345 invoked by uid 500); 29 Mar 2010 20:15:48 -0000 Delivered-To: apmail-maven-issues-archive@maven.apache.org Received: (qmail 68283 invoked by uid 500); 29 Mar 2010 20:15:48 -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 68275 invoked by uid 99); 29 Mar 2010 20:15:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Mar 2010 20:15:47 +0000 X-ASF-Spam-Status: No, hits=-1.4 required=10.0 tests=AWL,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; Mon, 29 Mar 2010 20:15:43 +0000 Received: from codehaus01.managed.contegix.com (localhost.localdomain [127.0.0.1]) by codehaus01.managed.contegix.com (Postfix) with ESMTP id F1CA214A82AB for ; Mon, 29 Mar 2010 15:15:22 -0500 (CDT) Date: Mon, 29 Mar 2010 15:15:22 -0500 (CDT) From: "David Biesack (JIRA)" To: issues@maven.apache.org Message-ID: <15389982.15108.1269893722987.JavaMail.haus-jira@codehaus01.managed.contegix.com> In-Reply-To: <26591533.15056.1269888866358.JavaMail.haus-jira@codehaus01.managed.contegix.com> Subject: [jira] Issue Comment Edited: (MNG-4613) Maven constructs wrong classpath element MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 4e90ceb663894a42f12c0e28abbab431 [ http://jira.codehaus.org/browse/MNG-4613?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=215978#action_215978 ] David Biesack edited comment on MNG-4613 at 3/29/10 3:14 PM: ------------------------------------------------------------- This tar file contains two projects a and b with maven poms. (Edit the poms to set the distribution info before running maven). build project a with mvn jar:test-jar site-deploy deploy then switch to project b and build it: mvn jar:test-jar site-deploy deploy this fails due to the wrong classpath, see b/mvn-2.2.1.log : [DEBUG] Output directory: U:\dev\mvnbug\b\target\test-classes [DEBUG] Classpath: [DEBUG] U:\dev\mvnbug\b\target\test-classes [DEBUG] U:\dev\mvnbug\b\target\classes [DEBUG] C:\Documents and Settings\sasdjb\.m2\repository\mypackage\a\0.1-SNAPSHOT\a-0.1-SNAPSHOT.jar [DEBUG] C:\Documents and Settings\sasdjb\.m2\repository\mypackage\a\0.1-SNAPSHOT\a-0.1-SNAPSHOT.jar If you build site-deploy and deploy in two parts, each works: mvn site-deploy mvn jar:test-jar deploy was (Author: djb): This tar file contains two projects a and b with maven poms. (Edit the poms to set the distribution info before running maven). build project a with mvn jar:test-jar site-deploy deploy then switch to project b and build it: mvn jar:test-jar site-deploy deploy this fails, see b/mvn-2.2.1.log due to the wrong classpath: [DEBUG] Output directory: U:\dev\mvnbug\b\target\test-classes [DEBUG] Classpath: [DEBUG] U:\dev\mvnbug\b\target\test-classes [DEBUG] U:\dev\mvnbug\b\target\classes [DEBUG] C:\Documents and Settings\sasdjb\.m2\repository\mypackage\a\0.1-SNAPSHOT\a-0.1-SNAPSHOT.jar [DEBUG] C:\Documents and Settings\sasdjb\.m2\repository\mypackage\a\0.1-SNAPSHOT\a-0.1-SNAPSHOT.jar If you build site-deploy and deploy in two parts, each works: mvn site-deploy mvn jar:test-jar deploy > Maven constructs wrong classpath element > ---------------------------------------- > > Key: MNG-4613 > URL: http://jira.codehaus.org/browse/MNG-4613 > Project: Maven 2 & 3 > Issue Type: Bug > Components: Plugins and Lifecycle > Affects Versions: 2.2.1 > Reporter: David Biesack > Attachments: MNG-4613.tar > > > We run Maven 2 builds from Cruise Control; the projects each build with the same targets: > clean jar:test-jar site-deploy deploy > Unfortunately, this causes the unit tests to run twice, once for site-deploy (surefire reports) and once for deploy. > Under 2.0.9 this was not a problem, but we recently switched to 2.2.1 and some tests were failing > because the test classpath constructed for the first set of test runs differs from the classpath for the second. > In the pom file, there is a dependency from the current project to both the normal jar *and* the test jar of > another project: > > com.sas.other > sas.other > 1.0-SNAPSHOT > test-jar > test > > > com.sas.other > sas.other > 1.0-SNAPSHOT > > The first test run contains > [DEBUG] /u/acladmin/.m2/repository/com/sas/other/sas.other/1.0-SNAPSHOT/sas.other-1.0-SNAPSHOT-tests.jar > ... > [DEBUG] /u/acladmin/.m2/repository/com/sas/other/sas.other/1.0-SNAPSHOT/sas.other-1.0-SNAPSHOT.jar > However, when we build with Maven 2.2.1, the classpath of the second test run is different: > [DEBUG] /u/acladmin/.m2/repository/com/sas/other/sas.other/1.0-SNAPSHOT/sas.other-1.0-SNAPSHOT.jar > ... > [DEBUG] /u/acladmin/.m2/repository/com/sas/other/sas.other/1.0-SNAPSHOT/sas.other-1.0-SNAPSHOT.jar > Because the classpath is missing a jar, the tests fail, and hence the entire build fails. > If we run the targets separately > mvn clean deploy > mvn site-deploy > then maven only runs the tests once per run, with the correct classpath, so the test and the entire build passes. > This looks like a regression between 2.0.9 and 2.2.1. Sorry, we did not install/test other intermediate releases. -- 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