Review request : JMC-6136 : Test compilation fails

Guru guru.hb at oracle.com
Thu Sep 6 23:43:19 UTC 2018


Hi,

JBS : https://bugs.openjdk.java.net/browse/JMC-6136 <https://bugs.openjdk.java.net/browse/JMC-6136> 
Webrev : http://cr.openjdk.java.net/~ghb/JMC-6136/webrev.2/

Root cause : Fix for JMC-6108 caused org.openjdk.jmc.common.test (+ other 3 test modules) not accesible by application's test module.
Background : Core test module uses 'maven-surfire-plugin' (Pure Maven) and tycho (Rest of the core modules) uses 'tycho-surfire-plugin'.
maven-surfire-plugin follows maven standard conventions and all the test class will be bundled to <artifactID>-tests.jar. where as 'tycho-surfire-plugin' is little alien to consume the maven-surfire-plugin generated test modules even though we specify '<scope>test</scope>' in the POM file. On the other hand 'tycho-surfire-plugin' won't differentiate between test and Non-test bundle. 

Solution : While building core-test modules append compiled test class to 'target/classes' (default will be "target/test-classes").

This will fix JMC-6132 as well. 

INFO : https://bugs.eclipse.org/bugs/show_bug.cgi?id=526404 (tycho-surefire-plugin and maven-surefire-plugin do not co-exist)

Tested on Windows, Linux and Mac OSX.

Thanks,
Guru


More information about the jmc-dev mailing list