[ 
https://issues.apache.org/jira/browse/MDEP-595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16471691#comment-16471691
 ] 

Beirtí Ó'Nunáin commented on MDEP-595:
--------------------------------------

Yeah, appreciate this is a pain. I don't know how the multi-threaded-module 
build works,can you point me at any extra info outside of this 
[https://cwiki.apache.org/confluence/display/MAVEN/Parallel+builds+in+Maven+3] 
? 

I think that the 'test-jar' dependency is confusing the execution graph 
somehow, but that's pure speculation

> Maven 3.5.2 introduces intermittent test-jar dependency failures in 
> multi-module builds
> ---------------------------------------------------------------------------------------
>
>                 Key: MDEP-595
>                 URL: https://issues.apache.org/jira/browse/MDEP-595
>             Project: Maven Dependency Plugin
>          Issue Type: Bug
>          Components: resolve
>         Environment: Windows 7 / Server 2012
> Maven 3.5.2
> JDK 1.8
> maven-jar-plugin 2.6
> maven-dependency-plugin 2.10 & 3.0.2
>            Reporter: Beirtí Ó'Nunáin
>            Priority: Major
>             Fix For: waiting-for-feedback
>
>
> This issue never presented in 6 months of running a multi-module build on 
> Maven 3.2.5. It began to present in Maven 3.5.2. 
> As it's intermittent, will obviously be difficult to reproduce, but here is a 
> knocked-down version of our project:
> * parent-aggregator
> ** project_a
> ** project_b
> *** builds jar and test-jar
> Project B has following pom snippet:
> {code:java}
>                       <plugin>
>                               <groupId>org.apache.maven.plugins</groupId>
>                               <artifactId>maven-jar-plugin</artifactId>
>                               <executions>
>                                       <execution>
>                                               <goals>
>                                                       <goal>test-jar</goal>
>                                               </goals>
>                                       </execution>
>                               </executions>
>                       </plugin>
> {code}
> Project A has a <type>test-jar</type> on Project B. The dependency 
> declaration is as follows
> {code:java}
> <dependency>
>   <groupId>mygroup</groupId>
>   <artifactId>projectB</artifactId>
>   <version>${project.version}</version>
>   <type>test-jar</type>
>   <scope>test</scope
> </dependency>
> {code}
> Using Maven 3.2.5, the dependency had been declared using 
> <classifier>tests</classifier> and this worked fine. Following a 
> recommendation on this page: 
> https://stackoverflow.com/questions/1725476/maven-test-dependency-in-multi-module-project
>  which refers to the previous editions of the guide suggesting classifier, I 
> switched to '<type>' but still have the same intermittent issue. 
> This page suggests that using 'test-jar' is supported but not ideal: 
> https://maven.apache.org/plugins/maven-jar-plugin/examples/create-test-jar.html
> Should we expect multi-module builds to work with test-jar dependencies or 
> should we be using a separate 'tests' module instead?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to