Java SpringBoot maven using Proguard

I try to use Proguard in my maven project (in pom.xml), but when I run command `

mvn clean package

it raise error: Failed to execute goal com.github.wvengen:proguard-maven-plugin:2.3.1:proguard (default) on project api: Obfuscation failed (result=1) → [Help 1]. Does anything need be installed more? Thanks all. have a nice day!

my pom:

                        <!-- This option will replace all strings in reflections method invocations with new class names.
                             For example, invokes Class.forName('className')-->
                        <!-- This option will save all original annotations and etc. Otherwise all we be removed from files.-->
                        <!-- This option will save all original names in interfaces (without obfuscate).-->
                        <option>-keepnames interface **</option>
                        <option>-keepnames public class * implements *</option>
                        <!-- This option will save all original methods parameters in files defined in -keep sections,
                             otherwise all parameter names will be obfuscate.-->
                        <!-- This option will save all original class files (without obfuscate) but obfuscate all
                             in domain and service packages.-->
                        <option>-keepclasseswithmembers public class com.beowulf.noc.api.BeowulfNOCApiV1Application {
                            public static void main(java.lang.String[]);
                        <!-- This option ignore warnings such as duplicate class definitions and classes in incorrectly
                            named files-->
                        <!-- This option will save all original class files (without obfuscate) in service package-->
                        <!-- <option>-keep class com.slm.proguard.example.spring.boot.service { *; }</option>-->
                        <!-- This option will save all original interfaces files (without obfuscate) in all packages.-->
                        <option>-keep interface * extends * { *; }</option>
                        <!-- This option will save all original defined annotations in all classes in all packages.-->
                        <option>-keep class com.slm.proguard.example.spring.boot.config.BeanConfig</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>-dontwarn com.fasterxml.jackson.databind.**</option>
                        <option>-dontwarn com.fasterxml.jackson.**</option>


Hi @test_dev,

Welcome! After examination, it appears it is not our plugin where the issue occurs, so we would advise opening this issue on the plugin’s Github page. We don’t officially provide a Maven integration or support but that should be a good first step for you.

Thanks for your time here and let us know how it goes,

1 Like