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

Wrong value for JDK (1.7) needed for building the project #460

Closed
visomar opened this issue Aug 13, 2024 · 0 comments · Fixed by #461
Closed

Wrong value for JDK (1.7) needed for building the project #460

visomar opened this issue Aug 13, 2024 · 0 comments · Fixed by #461
Milestone

Comments

@visomar
Copy link
Contributor

visomar commented Aug 13, 2024

According to the section Building in the README file,

Spring Retry requires Java 1.7 and Maven 3.0.5 (or greater)...

I tried to run the project with Java 8, and it complains about the version of JDK used:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  25.122 s
[INFO] Finished at: 2024-08-13T17:53:23+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.spring.javaformat:spring-javaformat-maven-plugin:0.0.41:validate (default) on project spring-retry: Execution default of goal io.spring.javaformat:spring-javaformat-maven-plugin:0.0.41:validate failed: An API incompatibility was encountered while executing io.spring.javaformat:spring-javaformat-maven-plugin:0.0.41:validate: java.lang.UnsupportedClassVersionError: io/spring/javaformat/eclipse/jdt/jdk11/internal/formatter/DefaultCodeFormatter has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>io.spring.javaformat:spring-javaformat-maven-plugin:0.0.41
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/Users/vsoriano/.m2/repository/io/spring/javaformat/spring-javaformat-maven-plugin/0.0.41/spring-javaformat-maven-plugin-0.0.41.jar
[ERROR] urls[1] = file:/Users/vsoriano/.m2/repository/io/spring/javaformat/spring-javaformat-formatter/0.0.41/spring-javaformat-formatter-0.0.41.jar
[ERROR] urls[2] = file:/Users/vsoriano/.m2/repository/io/spring/javaformat/spring-javaformat-config/0.0.41/spring-javaformat-config-0.0.41.jar
[ERROR] urls[3] = file:/Users/vsoriano/.m2/repository/io/spring/javaformat/spring-javaformat-formatter-eclipse-jdt-jdk8/0.0.41/spring-javaformat-formatter-eclipse-jdt-jdk8-0.0.41.jar
[ERROR] urls[4] = file:/Users/vsoriano/.m2/repository/io/spring/javaformat/spring-javaformat-formatter-eclipse-jdt-jdk11/0.0.41/spring-javaformat-formatter-eclipse-jdt-jdk11-0.0.41.jar
[ERROR] urls[5] = file:/Users/vsoriano/.m2/repository/io/spring/javaformat/spring-javaformat-formatter-eclipse-runtime/0.0.41/spring-javaformat-formatter-eclipse-runtime-0.0.41.jar
[ERROR] urls[6] = file:/Users/vsoriano/.m2/repository/org/codehaus/plexus/plexus-utils/3.5.1/plexus-utils-3.5.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
Click here to see the details

I believe there's a typo in the README file, and it should say requires Java 17 instead, as that's what matches what's been set in the pom.xml file:

<java.version>17</java.version>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants