Review request : JMC-6136 : Test compilation fails

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


JBS : <> 
Webrev :

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 : (tycho-surefire-plugin and maven-surefire-plugin do not co-exist)

Tested on Windows, Linux and Mac OSX.


More information about the jmc-dev mailing list