Review request : JMC-6136 : Test compilation fails

Marcus Hirt marcus.hirt at oracle.com
Thu Sep 6 23:45:17 UTC 2018


Looks good Guru! Go ahead!

 

Kind regards,

Marcus

 

From: Guru <guru.hb at oracle.com>
Date: Friday, 7 September 2018 at 01:43
To: <jmc-dev at openjdk.java.net>, Marcus Hirt <marcus.hirt at oracle.com>
Subject: Review request : JMC-6136 : Test compilation fails

 

Hi,

 

JBS : 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