Skip to content
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

Tycho can't be build with Java 21 #2950

Closed
akurtakov opened this issue Oct 23, 2023 · 7 comments · Fixed by #3029
Closed

Tycho can't be build with Java 21 #2950

akurtakov opened this issue Oct 23, 2023 · 7 comments · Fixed by #3029

Comments

@akurtakov
Copy link
Member

Using Java 21 as system JVM (as e.g Fedora 39 ships with and probably others) makes compiling Tycho fail with:

[ERROR] Failed to execute goal org.codehaus.plexus:plexus-component-metadata:2.1.1:generate-metadata (default) on project p2-maven-plugin: Error generating metadata: : Failed to extract descriptors: Unsupported class file major version 65 -> [Help 1]
@akurtakov
Copy link
Member Author

@laeubi There was some issue with moving away from it (as it's deprecated) but I can't recall the details

@laeubi
Copy link
Member

laeubi commented Oct 23, 2023

It might work to use a more recent asm version as a dependency for that plugin:

https://mvnrepository.com/artifact/org.ow2.asm/asm

in general the problem was that the JSR annotations previously used an old version in maven so they don't work on Java 17 compiles classes, now we moved to Maven 3.9.x it should work, but is a lot of work to migrate.

But I'm a bit curious why java 21 is actually used, maybe we need some source/target configuration somewhere?

@akurtakov
Copy link
Member Author

Would you please share an example of such migration to JSF (if you have handy)? In case someone decides to tackle this issue.

@akurtakov
Copy link
Member Author

I figured it after asking, there is a pretty detailed doc on the topic https://github.com/eclipse/sisu.plexus/wiki/Plexus-to-JSR330

@laeubi
Copy link
Member

laeubi commented Oct 23, 2023

Yes that's basically the reference, I planned to work on this for Maven4 /Tycho5 as we have to rewrite some stuff probably there ...

@alexsuter
Copy link

My build is failing when I set target level to 21:

Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:4.0.3:compile (default-compile) on project ch.****team.util.di: Fatal error compiling: target level should be in '1.1'...'1.8','9'...'20' (or '5.0'..'20.0') or cldc1.1: 21 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:4.0.3:compile (default-compile) on project *i: Fatal error compiling

@laeubi
Copy link
Member

laeubi commented Oct 31, 2023

My build is failing when I set target level to 21

Yes JDT (the compiler used by Tycho) does not yet support Java 21, you can use a snapshot or wait for the next release on 2023-12

akurtakov added a commit to akurtakov/tycho that referenced this issue Nov 10, 2023
laeubi pushed a commit that referenced this issue Nov 11, 2023
Newer asm has been needed.
Fixes #2950
github-actions bot pushed a commit that referenced this issue Nov 11, 2023
Newer asm has been needed.
Fixes #2950

(cherry picked from commit bce5c53)
laeubi pushed a commit that referenced this issue Nov 12, 2023
Newer asm has been needed.
Fixes #2950

(cherry picked from commit bce5c53)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants