We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm using maven rxjava vert.x project, i need to obfuscate my code
pom.xml looks like:
` io.reactiverse vertx-maven-plugin
<plugin> <groupId>com.googlecode.addjars-maven-plugin</groupId> <artifactId>addjars-maven-plugin</artifactId> <version>1.0.5</version> <executions> <execution> <goals> <goal>add-jars</goal> </goals> <configuration> <resources> <resource> <directory>${basedir}/libs</directory> </resource> </resources> </configuration> </execution> </executions> </plugin> <plugin> <groupId>com.github.wvengen</groupId> <artifactId>proguard-maven-plugin</artifactId> <version>2.5.1</version> <executions> <execution> <phase>package</phase> <goals> <goal>proguard</goal> </goals> </execution> </executions> <configuration> <proguardVersion>${proguard.version}</proguardVersion> <injar>${project.build.finalName}.jar</injar> <outjar>${project.build.finalName}.jar</outjar> <obfuscate>true</obfuscate> <options> <option>-dontshrink</option> <option>-dontoptimize</option> <option>-adaptclassstrings</option> <option>-keepattributes Exceptions, InnerClasses, Signature, Deprecated, SourceFile, LineNumberTable, *Annotation*, EnclosingMethod </option> <option>-keepnames interface **</option> <option>-keepparameternames</option> <option>-keep class com.waylau.proguard.ProguardMavenPluginSpringBootExampleApplication { public static void main(java.lang.String[]); } </option> <option>-ignorewarnings</option> <!-- <option>-keep class com.waylau.proguard.service { *; }</option> --> <option>-keep interface * extends * { *; }</option> <option>-keep class com.fasterxml.jackson.** { *; }</option> <option>-keep class org.json.JSONObject.** {** put(java.lang.String,java.util.Map);}</option> <option>-keepclassmembers class * { @org.springframework.context.annotation.Bean *; @org.springframework.beans.factory.annotation.Autowired *; @org.springframework.beans.factory.annotation.Value *; } </option> <option>-dontwarn com.fasterxml.jackson.databind.**</option> <option>-dontwarn com.fasterxml.jackson.**</option> </options> <injarNotExistsSkip>true</injarNotExistsSkip> <libs> <!--<lib>${java.home}/lib/rt.jar</lib> --> </libs> </configuration> <dependencies> <dependency> <groupId>com.guardsquare</groupId> <artifactId>proguard-base</artifactId> <version>${proguard.version}</version> </dependency> </dependencies> </plugin> </plugins> </build>`
here is the error
[proguard] ProGuard, version 7.3.2 [proguard] Exception in thread "main" java.lang.NoSuchMethodError: proguard.io.ClassReader.<init>(ZZZZZLproguard/classfile/util/WarningPrinter;Lproguard/classfile/visitor/ClassVisitor;)V [proguard] at proguard.InputReader.execute(InputReader.java:93) [proguard] at proguard.pass.PassRunner.run(PassRunner.java:24) [proguard] at proguard.ProGuard.readInput(ProGuard.java:333) [proguard] at proguard.ProGuard.execute(ProGuard.java:124) [proguard] at proguard.ProGuard.main(ProGuard.java:651) [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5.028 s [INFO] Finished at: 2023-05-05T20:28:13+05:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.github.wvengen:proguard-maven-plugin:2.5.1:proguard (default) on project sparkplug-processor: Obfuscation failed (result=1) -> [Help 1]
can anyone help?
The text was updated successfully, but these errors were encountered:
Try to also add proguard-core dependency to the plugin dependencies. Now you only seem to have proguard-base.
Sorry, something went wrong.
I was having the name issue @kashifJawed90 the suggestion from @lasselindqvist did the trick for me:
<dependency> <groupId>com.guardsquare</groupId> <artifactId>proguard-core</artifactId> <version>9.0.8</version> <scope>runtime</scope> </dependency>
No branches or pull requests
I'm using maven rxjava vert.x project, i need to obfuscate my code
pom.xml looks like:
`
io.reactiverse
vertx-maven-plugin
here is the error
[proguard] ProGuard, version 7.3.2 [proguard] Exception in thread "main" java.lang.NoSuchMethodError: proguard.io.ClassReader.<init>(ZZZZZLproguard/classfile/util/WarningPrinter;Lproguard/classfile/visitor/ClassVisitor;)V [proguard] at proguard.InputReader.execute(InputReader.java:93) [proguard] at proguard.pass.PassRunner.run(PassRunner.java:24) [proguard] at proguard.ProGuard.readInput(ProGuard.java:333) [proguard] at proguard.ProGuard.execute(ProGuard.java:124) [proguard] at proguard.ProGuard.main(ProGuard.java:651) [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5.028 s [INFO] Finished at: 2023-05-05T20:28:13+05:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.github.wvengen:proguard-maven-plugin:2.5.1:proguard (default) on project sparkplug-processor: Obfuscation failed (result=1) -> [Help 1]
can anyone help?
The text was updated successfully, but these errors were encountered: