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

build failure with java 17 #4131

Closed
landryb opened this issue Dec 29, 2023 · 4 comments · Fixed by #4132
Closed

build failure with java 17 #4131

landryb opened this issue Dec 29, 2023 · 4 comments · Fixed by #4132

Comments

@landryb
Copy link
Member

landryb commented Dec 29, 2023

i know it's recent but apparently building master with java 17 fails in the maven-war plugin (running with java 17 is fine):

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.6:war (default) on project geowebcache-webapp: Execution default of goal org.apache.maven.plugins:maven-war-plugin:2.6:war failed: Unable to load the mojo 'war' in the plugin 'org.apache.maven.plugins:maven-war-plugin:2.6' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: null
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.apache.maven.plugins:maven-war-plugin:2.6
..
...
[ERROR] : ExceptionInInitializerError: Unable to make field private final java.util.Comparator java.util.TreeMap.comparator accessible: module java.base does not "opens java.util" to unnamed module @3a3fb598
[ERROR] -> [Help 1]

i've retried after dropping ~/.m2, and im seeing the same failure building mapstore with java 17. after a quick look, it seems maven-war (at least?) needs an update. will try various random things, but since i dont really enjoy wrestling maven.... :)

the failure im seeing is in gwc, but there might be others in other webapps.

@landryb
Copy link
Member Author

landryb commented Dec 29, 2023

trying to change all the occurences of maven-war-plugin in the various pom.xml files to use 3.4.0 (cf geosolutions-it/MapStore2#9850), but it still fails on sec-proxy:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.6:war (default-war) on project security-proxy: Execution default-war of goal org.apache.maven.plugins:maven-war-plugin:2.6:war failed: Unable to load the mojo 'war' in the plugin 'org.apache.maven.plugins:maven-war-plugin:2.6' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: null

thing is, the sec-proxy pom.xml doesnt mention maven-war-plugin, nor a 2.6 version, so something might bring this version as a default ?

@landryb
Copy link
Member Author

landryb commented Dec 29, 2023

making some progress, now im failing on the df backend, but that's more something to change in the java code itself:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project datafeeder: Fatal error compiling: java.lang.IllegalAccessError: class lombok.javac.apt.LombokProcessor (in unnamed module @0x6a944b0d) cannot access class com.sun.tools.javac.processing.JavacProcessingEnvironment (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.processing to unnamed module @0x6a944b0d -> [Help 1]

@landryb
Copy link
Member Author

landryb commented Dec 29, 2023

making some progress, now im failing on the df backend, but that's more something to change in the java code itself:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project datafeeder: Fatal error compiling: java.lang.IllegalAccessError: class lombok.javac.apt.LombokProcessor (in unnamed module @0x6a944b0d) cannot access class com.sun.tools.javac.processing.JavacProcessingEnvironment (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.processing to unnamed module @0x6a944b0d -> [Help 1]

updating lombok in 57ab02b fixed that failure, now master builds with java 17.

@landryb
Copy link
Member Author

landryb commented Jan 16, 2024

fixed by #4132

@landryb landryb closed this as completed Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant