Hello Tycho devs and users,
I have a PDE project that builds with Tycho and runs unit tests using the tycho-surefire-plugin. I also have a custom jlinked JRE based on Java 11 plus some required JPMS modules. This JRE is ultimately shipped in the product and is used to run it.
Ideally I would like tycho-surefire-plugin to run my tests using the same JRE. We have encountered issues where tests passed on the JDK used by Maven, but the corresponding functionality failed in production due to runtime differences.
However the tycho-surefire-plugin does not appear to have any option to directly specify a runtime JRE. The only relevant configuration option is <useJDK> which can be either "system" -- i.e. the same JDK running the Maven build, meaning it must be a JDK rather than a JRE -- or "BREE", i.e. use the Bundle-RequiredExecutionEnvironment header from the project to find a Java installation.
Currently "BREE" does not work at all with Java 11 because ofÂ
https://bugs.eclipse.org/bugs/show_bug.cgi?id=548999. Even if it worked we would have to create a Maven toolchain entry for the custom JRE, which is far from ideal. I really just want to tell Tycho to use a Java runtime at a specified path. Are there any plans to support this?
Thanks,
Neil