问题描述
我正在尝试使用 Proguard 混淆 spring boot 应用程序,但在解析其依赖项时失败。
由于此错误,我无法构建应用程序,因为由于禁止访问(状态代码 403),无法下载其中一个文件:
[INFO] ------------------------------------------------------- [INFO] T E S T S [INFO] ------------------------------------------------------- [INFO] [INFO] Results: [INFO] [INFO] Tests run: 0,Failures: 0,Errors: 0,Skipped: 0 [INFO] [INFO] [INFO] --- proguard-maven-plugin:2.3.1:proguard (default) @ ITIDAGGUtilityService --- [INFO] Downloading from : https://dl.bintray.com/guardsquare/proguard/com/guardsquare/proguard-base/7.0.0/proguard-base-7.0.0.pom [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5.052 s [INFO] Finished at: 2021-05-06T23:59:17+02:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.github.wvengen:proguard-maven-plugin:2.3.1:proguard (default) on project ITIDAGGUtilityService: Execution default of goal com.github.wvengen:proguard-maven-plugin:2.3.1:proguard Failed: Plugin com.github.wvengen:proguard-maven-plugin:2.3.1 or one of its dependencies Could not be resolved: Failed to collect dependencies at com.github.wvengen:proguard-maven-plugin:jar:2.3.1 -> com.guardsquare:proguard-base:jar:7.0.0: Failed to read artifact descriptor for com.guardsquare:proguard-base:jar:7.0.0: Could not transfer artifact com.guardsquare:proguard-base:pom:7.0.0 from/to bintray-guardsquare-proguard (https://dl.bintray.com/guardsquare/proguard): Access denied to https://dl.bintray.com/guardsquare/proguard/com/guardsquare/proguard-base/7.0.0/proguard-base-7.0.0.pom. Error code 403,Forbidden -> [Help 1
@H_502_9@<plugin> <groupId>com.github.wvengen</groupId> <artifactId>proguard-maven-plugin</artifactId> <executions> <execution> <phase>package</phase> <goals> <goal>proguard</goal> </goals> </execution> </executions> <configuration> <proguardVersion>5.3.3</proguardVersion> <injar>${project.build.finalName}.jar</injar> <outjar>${project.build.finalName}.jar</outjar> <obfuscate>true</obfuscate> <options> <option>-dontshrink</option> <option>-dontoptimize</option> <!-- This option will replace all strings in reflections method invocations with new class names. For example,invokes Class.forName('className') --> <option>-adaptclassstrings</option> <!-- This option will save all original annotations and etc. Otherwise all we be removed from files. --> <option>-keepattributes Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,LocalVariable*Table,*Annotation*,Synthetic,EnclosingMethod</option> <option>-keepclassmembers public class * {void set*(***);*** get*();}</option> <!-- This option will save all original names in interfaces (without obfuscate). --> <option>-keepnames interface **</option> <!-- This option will save all original methods parameters in files defined in -keep sections,otherwise all parameter names will be obfuscate. --> <option>-keepparameternames</option> <!-- This option will save all original class files (without obfuscate) but obfuscate all in domain package. --> <!--<option>-keep class !com.jincloud.** { *; }</option> --> <option>-keep @org.springframework.boot.autoconfigure.SpringBootApplication class * {*;}</option> <option>-keep class com.nagisa.zz.** { *; }</option> <!-- This option will save all original class files (without obfuscate) in service package --> <!-- 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 class in all packages. --> <option>-keepclassmembers class * { @org.springframework.beans.factory.annotation.Autowired *; @org.springframework.beans.factory.annotation.Value *; } </option> </options> <libs> <!-- Include main JAVA library required. --> <lib>${java.home}/lib/rt.jar</lib> </libs> </configuration> <dependencies> <dependency> <groupId>net.sf.proguard</groupId> <artifactId>proguard-base</artifactId> <version>5.3.3</version> </dependency> </dependencies>
@H_502_9@有没有人有如何对 spring boot 应用程序进行 obufscate 的教程?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)