Closed
Description
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>