Hey Dan,

Given the symptoms you mention, I think you may be hitting the same issue with 
your concurrent build as we did a while ago (and which has been reported as 
https://issues.apache.org/jira/browse/MNG-5960).

Basically, (based on some debugging I did for our build,) having some aggregate 
plugin running in anything else than your root project may cause this to happen 
in a multi-threaded build. In our case, it was the default behaviour of the 
maven-javadoc-plugin. In short, it boils down to the aggregate plugin resolving 
compile-scope dependencies for _all_ projects in the reactor, which may 
possibly overwrite already resolved test-scope dependencies for currently 
building projects; resulting in classpath issues (usually) no longer being able 
to find junit.

I don't know if there is an easy way to find aggregate plugins other than 
looking into their mojo source code; so maybe someone else on this list can 
help you with that..

Good luck!

-- Fabian

On Fri, 2017-05-05 at 00:51 -0700, Dan Tran wrote:

Hi

Lately, my build randomly fails with

  java.lang.NoClassDefFoundError: org/junit/runner/notification/RunNotifier
 at surefire


My environment consists of

  * 200+ modules  running with --builder smart  -T 4
  * surefire 2.19.1 and 2.20, maven 3.3.9 and 3.5
  * Build runs on Sles12SP2 with OpenJDK8

Stack Overflow has a similar issue back in 2014

Any suggestion helping to trouble shoot this issue is greatly appreciated

Thanks

-Dan

Reply via email to