Discussion:
Using Maven Compiler plugin with tycho-compiler-jdt and toolchains.xml
(too old to reply)
j***@offilive.com
2018-05-10 12:14:46 UTC
Permalink
Hi there,

I am trying to use tycho-compiler-jdt 1.1.0 with maven-compiler-plugin as described here https://wiki.eclipse.org/Tycho/FAQ#Can_I_use_the_Tycho_compiler_support_in_non-OSGi_projects.2C_too.3F (https://wiki.eclipse.org/Tycho/FAQ#Can_I_use_the_Tycho_compiler_support_in_non-OSGi_projects.2C_too.3F)

However my requirement is to also use the maven-toolchains-plugin, this means, I need to execute the Maven build with JDK8 but compile some modules with lower JDKs. I first tried to use the plexus-compiler-eclipse but it ignores the toolchain configuration and always tries to compile against the runtime of the JDK that is used to executed with maven.

When using tycho-compiler-jdt instead of plexus-compiler-eclipse, the build fails with "compileoutOfProcess not supported", even setting the option <fork>false</fork> does not help.

The tycho-compiler-plugin already seems to be toolchain aware https://www.eclipse.org/tycho/sitedocs/tycho-compiler-plugin/compile-mojo.html#useJDK (https://www.eclipse.org/tycho/sitedocs/tycho-compiler-plugin/compile-mojo.html#useJDK)

I saw that with this commit https://github.com/eclipse/tycho/commit/5928f7d4dfe18679f28efbd4ca9138db12ad3cb5#diff-266aa6567d1eb927cd223313fd964298 (https://github.com/eclipse/tycho/commit/5928f7d4dfe18679f28efbd4ca9138db12ad3cb5#diff-266aa6567d1eb927cd223313fd964298)
some improvements have been done in regards to toolchains support to tycho-compiler-jdt.

So I wonder if there is any configuration to get tycho-compiler-jdt + maven-compiler-plugin + maven-toolchains-plugin working?

Thanks,
Jo

Continue reading on narkive:
Loading...