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

ITs fail on Java 11 #161

Closed
lasselindqvist opened this issue Sep 26, 2021 · 2 comments · Fixed by #162
Closed

ITs fail on Java 11 #161

lasselindqvist opened this issue Sep 26, 2021 · 2 comments · Fixed by #162

Comments

@lasselindqvist
Copy link
Collaborator

ITs fail on Java 11:

[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Source option 6 is no longer supported. Use 7 or later.
[ERROR] Target option 6 is no longer supported. Use 7 or later.
[INFO] 2 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 38.369 s
[INFO] Finished at: 2021-09-26T19:52:55+03:00
[INFO] ------------------------------------------------------------------------
[WARNING] The requested profile "integration-test" could not be activated because it does not exist.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project simple: Compilation failure: Compilation failure:
[ERROR] Source option 6 is no longer supported. Use 7 or later.
[ERROR] Target option 6 is no longer supported. Use 7 or later.
[ERROR] -> [Help 1]

@lasselindqvist
Copy link
Collaborator Author

With Java 11 fails to:

 [proguard] Initializing...
 [proguard] Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/logging/log4j/LogManager
 [proguard] 	at proguard.classfile.editor.CodeAttributeEditor.<clinit>(CodeAttributeEditor.java:113)
 [proguard] 	at proguard.classfile.util.DynamicMemberReferenceInitializer.<init>(DynamicMemberReferenceInitializer.java:87)
 [proguard] 	at proguard.Initializer.execute(Initializer.java:246)
 [proguard] 	at proguard.ProGuard.initialize(ProGuard.java:327)
 [proguard] 	at proguard.ProGuard.execute(ProGuard.java:132)
 [proguard] 	at proguard.ProGuard.main(ProGuard.java:717)
 [proguard] Caused by: java.lang.ClassNotFoundException: org.apache.logging.log4j.LogManager
 [proguard] 	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:606)
 [proguard] 	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:168)
 [proguard] 	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
 [proguard] 	... 6 more

We need to start also adding some other JARs to classpath, Now we only add the ones from getProguardJars method. This is why also Kotlin obfuscation might have failed even previously.

		for (File p : proguardJars)
			java.createClasspath().createPathElement().setLocation(p);

@lasselindqvist
Copy link
Collaborator Author

See also #122

lasselindqvist added a commit to lasselindqvist/proguard-maven-plugin that referenced this issue Sep 27, 2021
Otherwise Kotlin obfuscation or obfuscation with newer version fails.
lasselindqvist added a commit to lasselindqvist/proguard-maven-plugin that referenced this issue Sep 27, 2021
lasselindqvist added a commit that referenced this issue Sep 27, 2021
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.

1 participant