1
之前,我有一個像下面插件配置:MVN的ProGuard:是否有可能模糊處理依賴複製
<project>
...
<build>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/libs</outputDirectory>
<overWriteReleases>true</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.pyx4me</groupId>
<artifactId>proguard-maven-plugin</artifactId>
<version>2.1.0-SNAPSHOT</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>proguard</goal>
</goals>
</execution>
</executions>
<configuration>
<proguardVersion>4.8</proguardVersion>
<obfuscate>true</obfuscate>
<includeDependency>true</includeDependency>
<injar>${project.artifactId}-${project.version}.jar</injar>
<outjar>${project.artifactId}-${project.version}-obf.jar</outjar>
<outputDirectory>${project.build.directory}</outputDirectory>
<maxMemory>256m</maxMemory>
<options>
<option>-keepclasseswithmembers class **, !some.specific.package.** { *; }</option>
<option>-keep public class some.specific.package.Main { public *; public static *; }</option>
<option>-allowaccessmodification</option>
<option>-dontskipnonpubliclibraryclasses</option>
<option>-dontskipnonpubliclibraryclassmembers</option>
<option>-dontwarn org.apache.log4j.**</option>
</options>
<libs>
<lib>${java.home}/lib/rt.jar</lib>
<lib>${java.home}/lib/javaws.jar</lib>
<lib>${javafx_home}/lib/jfxrt.jar</lib>
</libs>
</configuration>
<dependencies>
<dependency>
<groupId>net.sf.proguard</groupId>
<artifactId>proguard-base</artifactId>
<version>4.8</version>
</dependency>
</dependencies>
</plugin>
</build>
...
</project>
我想混淆特定包some.specific.package
的罐子和它們的依賴(複製之前)。有可能做到嗎?
我想混淆過於依賴 – CAMOBAP