[GitHub] [maven] fkalinski commented on issue #310: [MNG-6843] - Parallel build fails due to missing JAR artifacts in compilePath

2020-04-22 Thread GitBox


fkalinski commented on issue #310:
URL: https://github.com/apache/maven/pull/310#issuecomment-617783528


   As I have checked, the havoc is caused by ensureDependenciesAreResolved 
setting the artifactFilter to null on all the projects when executing 
"effective-pom" aggregate mojo.  
   All the other mojos are affecting only the one module for which the mojo is 
executed.
   
   As it's an aggregator, it writes effective pom for each projects. During 
that it accesses project.getDependencies(), therefore clearing the artifact 
filters makes some sense, despite that doing that by modifying MavenProject 
objects is really ugly.
   
   Therefore, the problem lies in handling of aggregator mojos, and it's 
definitely a Maven bug to be fixed. The workaround with ThreadLocals works for 
me, and it actually should be due to nature of the problem. It would be 
interesting to see what actaully happens for you, @famod .
   
   And specifically in the project I am working on, "maven-help-plugin", with 
it's "effective-pom" mojo has been configured on the parent project level, 
thus, clearing the artifact list on execution of all the modules. After moving 
it to the top pom project parallel build finally works for me!



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [maven] fkalinski commented on issue #310: [MNG-6843] - Parallel build fails due to missing JAR artifacts in compilePath

2020-04-21 Thread GitBox


fkalinski commented on issue #310:
URL: https://github.com/apache/maven/pull/310#issuecomment-617364690


   I've done actually the same change and it works for me. 
   The only difference, is not factoring the ThreadlLocals into a common class, 
but plainly using the three of them on the same fields 
(https://github.com/fkalinski/maven/commit/b38e3c2bfb6183c0f45214012112a1c1ca4048bd)
   
   Before the change, parallel builds were failing around 30% of the time, on 
the 64-module project I work on.  Due to many inter-dependencies, maximum 
parallelism than can be achieved on the project is around 4. When build fails. 
it fails fast, as the initial modules that are built are of a small size.
   
   After the change applied again today, I haven't seen a failed build, yet.



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [maven] fkalinski commented on issue #310: [MNG-6843] - Parallel build fails due to missing JAR artifacts in compilePath

2020-04-21 Thread GitBox


fkalinski commented on issue #310:
URL: https://github.com/apache/maven/pull/310#issuecomment-617130914


   @famod I was also going to test the ThreadLocal approach, as it seems as an 
easiest workaround. 
   
   I have tried an approach with ThreadLocal around 
MavenProject.artifactMap,artifactFilter and artifacts. Seemed to work for me, 
but didn't test it extensively, and it was a few months ago.
   
   Have you tried the same?
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org