I have a maven project which was recently bumped up to Java 17. Along with that the Proguard version was also bumped to 7.2.2 from 6.2.2. I tried building it on my system but faced the error mentioned. I also noticed that in the trace logs the proguard versions did not match. I tried to copy the plugins from someone, on whose machine the project built successfully. My JAVA_HOME is also pointing to where jdk 17 is. Please share your insights if you have faced similar issue in the past or knows the solution to it.
The version updated pom.xml:
<configuration>
<proguardVersion>7.2.2</proguardVersion>
<libs>
<lib>${java.home}/jmods</lib>
</libs>
</configuration>
The error I'm getting:
[proguard] Reading library directory [C:\dev\jdk17.0.8_8\jmods] (filtered)
[proguard] Error: Can't read [C:\dev\jdk17.0.8_8\jmods] (Can't read [java.base.jmod] (Can't process class [module-info.class] (Unsupported version number [61.0] (maximum 57.0, Java 13))))
[ERROR] Failed to execute goal com.github.wvengen:proguard-maven-plugin:2.6.0:proguard (default) on project project.api: Obfuscation failed (result=1) -> [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/MojoExecutionException
The weird thing I noticed in the build traces:
[INFO] proguard jar: [C:\Users\rohan.dahiya\.m2\repository\com\guardsquare\proguard-base\7.2.2\proguard-base-7.2.2.jar]
[proguard] ProGuard, version 6.2.2
[proguard] Reading program directory [D:\project\api\target\classes_proguard_base] (filtered)
The proguard jar has the name appended with 7.2.2 version but in the very next line it says: [proguard] ProGuard, version 6.2.2