You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Kris Nuttycombe (JIRA)" <ji...@codehaus.org> on 2008/10/15 23:13:19 UTC

[jira] Commented: (MNG-1823) dependencies with classifier mask transitive dependencies of same dependency without classifier

    [ http://jira.codehaus.org/browse/MNG-1823?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=150923#action_150923 ] 

Kris Nuttycombe commented on MNG-1823:
--------------------------------------

This problem has ramifications beyond the scope of testing dependencies; a common scenario for the use of classifiers is in artifacts that are built for specific deployment environments which contain configuration files specific to those environments (in my case, war and ear files). In my case, I had hoped to specify an environment property in a profile, the value of which would be used for the classifier of each module in a multi-module project; the environment is also used for the selection of a filter file to use.

The lack of transitive dependencies with classifiers means that my modules cannot properly declare dependencies on one another, as the transitive dependencies of the modules being depended upon are ultimately excluded from the final artifact.

> dependencies with classifier mask transitive dependencies of same dependency without classifier
> -----------------------------------------------------------------------------------------------
>
>                 Key: MNG-1823
>                 URL: http://jira.codehaus.org/browse/MNG-1823
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Inheritance and Interpolation
>    Affects Versions: 2.0.1
>            Reporter: Jorg Heymans
>             Fix For: 3.0
>
>
> A module in cocoon has following dependencies : 
>    <dependency>
>       <groupId>org.apache.cocoon</groupId>
>       <artifactId>cocoon-core</artifactId>
>       <version>2.2.0-SNAPSHOT</version>
>       <classifier>tests</classifier>
>       <scope>test</scope>
>     </dependency>
>     <dependency>
>       <groupId>org.apache.cocoon</groupId>
>       <artifactId>cocoon-core</artifactId>
>       <version>2.2.0-SNAPSHOT</version>
>     </dependency>
> The first dependency is created by the core module using :
>       <plugin>
>         <artifactId>maven-jar-plugin</artifactId>
>         <executions>
>           <execution>
>             <goals>
>               <goal>test-jar</goal>
>             </goals>
>           </execution>
>         </executions>
>       </plugin>
> Now i would like the module to depend on the jar with classifier "tests" during the testing phase ie cocoon-core-2.2.0-SNAPSHOT-tests.jar, and during the normal compilation phase it should just use cocoon-core-2.2.0-SNAPSHOT.jar. IMO above dependencies express exactly this.
> The problem is that maven somehow removes all transitive dependencies from  cocoon-core-2.2.0-SNAPSHOT.jar when both dependencies are in place, breaking compilation. When i remove the dependency with the classifier, then all is fine (but ofcourse my tests can't run)
> I hope above is clear, otherwise just ping me on irc

-- 
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