如何解决无法解析 proguard maven 插件来混淆 Spring Boot 应用程序
我正在尝试使用 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
<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>
有没有人有如何对 spring boot 应用程序进行 obufscate 的教程?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。