maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Bentmann (JIRA)" <j...@codehaus.org>
Subject [jira] Closed: (MPIR-188) Maven constructs wrong classpath element
Date Mon, 05 Apr 2010 17:52:23 GMT

     [ http://jira.codehaus.org/browse/MPIR-188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Benjamin Bentmann closed MPIR-188.
----------------------------------

    Resolution: Duplicate

David, Maven is a plugin framework and as such a build error can result from the Maven core
misbehaving or any of the plugins used by the build. This issue is located in the "Maven 2.x
Project Info Reports Plugin", not the Maven core. In other words, the Maven version you use
is completely irrelevant, it's the plugin version that matters. So update your projects to
use the most recent plugin version (i.e. 2.1.2) and you're fine.

> Maven constructs wrong classpath element
> ----------------------------------------
>
>                 Key: MPIR-188
>                 URL: http://jira.codehaus.org/browse/MPIR-188
>             Project: Maven 2.x Project Info Reports Plugin
>          Issue Type: Bug
>          Components: dependencies
>    Affects Versions: 2.1
>            Reporter: David Biesack
>            Assignee: Benjamin Bentmann
>         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:
>     <dependency>
>       <groupId>com.sas.other</groupId>
>       <artifactId>sas.other</artifactId>
>       <version>1.0-SNAPSHOT</version>
>       <type>test-jar</type>
>       <scope>test</scope>
>     </dependency>
>   <dependency>
>       <groupId>com.sas.other</groupId>
>       <artifactId>sas.other</artifactId>
>       <version>1.0-SNAPSHOT</version>
>     </dependency>
> 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

        

Mime
View raw message