-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature project not compiled when using toolchains.xml #4442
Comments
Beside that features are not compiled (just resolved / packaged) and the errors says that your feature depends on something that requires Java 21 but you are using Java 17. So is there any reason not running the build with Java 21 in the first place, removing BREE and just let Tycho workout the target level itself? You won't even need a toolchains configuration then at all. |
Copied and pasted from another project. Can be ignored.
I have Java 17 installed as the system Java and was testing against Java 21 so thought this would work. It works OK if there are no feature projects so I thought this might be an issue worth reporting. |
Features do not have any BREE obviously so they somehow fall back to the running JVM, this could probably be improved but its quite uncommon to run with a lower JVM but build for a higher JVM. |
Fair enough. I just reported it for completeness sake. |
If the host system Java version differs from that specified in a plugin's BREE and that plug-in is referenced in an Eclipse Feature project, compilation of the Feature fails even if
toolchains.xml
contains the path to the correct Java version.Attached is a test.zip file containing a very simple
pom.xml
file, an Eclipse Plug-in Project, an Eclipse Feature Project and atoolchains.xml
file (and a.mvn
folder containing aextensions.xml
file).To test this:
export JAVA_HOME=/pathto/Java17
before runningmvn clean verify
)toolchains.xml
file so that thejdkHome
paths point to Java 17 and 21 locations (you might not need the JavaSE-17 one)toolchains.xml
file to the~/.m2
directory or use the--global-toolchains file
option to reference itmvn clean verify
Note that compilation succeeds if
<module>TestFeature</module>
is removed from thepom.xml
file. So the error seems to occur only with Feature Projects.The text was updated successfully, but these errors were encountered: