我正在进行插件混淆。通常混淆是有效的(目标我已经混淆了jar),但是当我构建产品时,没有混淆的插件。当我在代码中添加一些方法时,方法就在产品中。我不知道为什么混淆插件不是产品。我正在使用maven-tycho
,p2
和jenkins作为构建器。这是我使用maven进行模糊处理的maven配置:
<plugin>
<groupId>com.github.wvengen</groupId>
<artifactId>proguard-maven-plugin</artifactId>
<version>2.0.6</version>
<dependencies>
<dependency>
<groupId>net.sf.proguard</groupId>
<artifactId>proguard-base</artifactId>
<version>5.2</version>
</dependency>
</dependencies>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>proguard</goal>
</goals>
</execution>
</executions>
<configuration>
<proguardVersion>5.2</proguardVersion>
<options>
<option>-keep class org.apache.** { *; }</option>
<option>-keep class org.osgi.** { *; }</option>
<option>-keep class org.eclipse.** { *; }</option>
<option>-keep class * extends
org.eclipse.ui.plugin.AbstractUIPlugin
</option>
<option>-keep class * extends org.eclipse.ui.part.ViewPart</option>
<option>-keep class * implements org.eclipse.ui.INewWizard</option>
<option>-keep class * implements
org.eclipse.core.runtime.IPlatformRunnable
</option>
<option>-dontshrink</option>
<option>-dontoptimize</option>
<option>-dontpreverify</option>
<option>-obfuscationdictionary keywords</option>
<option>-classobfuscationdictionary keywords</option>
<option>-keeppackagenames **view**</option>
</options>
<libs>
<lib>${java.home}/lib/rt.jar</lib>
<lib>${java.home}/lib/jce.jar</lib>
</libs>
</configuration>
</plugin>
答案 0 :(得分:1)
对某些人来说可能会有用,我从<phase>install</phase>
更改为打包,现在一切正常。它看起来像是在安装maven阶段之前将tycho jar放入p2存储库。