[
https://jira.codehaus.org/browse/MNG-5621?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Robert Scholte closed MNG-5621.
-------------------------------
Resolution: Duplicate
Assignee: Robert Scholte
Duplicate of MNG-1378, Also read [this
blog|http://rfscholte.wordpress.com/2010/09/05/how-to-create-a-jar-containing-reusableabstract-testclasses-with-maven/]
to understand the current behavior.
> Transitive dependency for both compile and test
> -----------------------------------------------
>
> Key: MNG-5621
> URL: https://jira.codehaus.org/browse/MNG-5621
> Project: Maven 2 & 3
> Issue Type: Improvement
> Components: Dependencies
> Affects Versions: 3.2.1
> Environment: Apache Maven 3.2.1
> (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-15T02:37:52+09:00)
> Maven home: /usr/local/Cellar/maven/3.2.1/libexec
> Java version: 1.8.0, vendor: Oracle Corporation
> Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "mac os x", version: "10.9.2", arch: "x86_64", family: "mac"
> Reporter: Jin Kwon
> Assignee: Robert Scholte
> Priority: Trivial
>
> * artifact `B` depends on `A` in test scope.
> * artifact 'C' depends on 'B' in compile scope and test scope with test-jar
> {code:xml}
> <artifactId>B</artifactId>
> <dependencies>
> <dependency>
> <artifactId>A</artifactId>
> <scope>test</scope>
> </dependency>
> </dependencies>
> {code}
> {code:xml}
> <artifactId>C</artifactId>
> <dependencies>
> <dependency>
> <artifactId>B</artifactId>
> <scope>compile</scope>
> </dependency>
> <dependency>
> <artifactId>B</artifactId>
> <type>test-jar</type>
> <scope>test</scope>
> </dependency>
> </dependencies>
> {code}
> {{expected: artifact 'C''s classpath contains 'A'}}
> {{actual : 'A' is unknown in 'C''s test time}}
> Is this normal behaviour or {{test-jar with test}} overrides {{compile}}
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)