proguard.parseexception: unknown option '-尊龙官方平台

proguard.parseexception: unknown option '-keepdirectories' in line 57 of file

el/2024/3/25 20:39:29

问题场景


在使用maven proguard打包项目进行混淆时,提示以下错误:

[proguard] proguard.parseexception: unknown option ‘-keepdirectories’ in line 57 of file ‘f:\workspaces\middle\trunk\proguard.conf’,
[proguard] included from argument number 4
[proguard] at proguard.configurationparser.parse(configurationparser.java:164)
[proguard] at proguard.proguard.main(proguard.java:491)

pom配置


            <plugin><groupid>com.pyx4megroupid><artifactid>proguard-maven-pluginartifactid><executions><execution><phase>packagephase><goals><goal>proguardgoal>goals>execution>executions><configuration><obfuscate>trueobfuscate><proguardinclude>${basedir}/proguard.confproguardinclude><libs><lib>${java.home}/lib/rt.jarlib><lib>lib/jsp-api.jarlib><lib>lib/servlet-api.jarlib>libs><addmavendescriptor>falseaddmavendescriptor>configuration>plugin>

问题分析


似乎是proguard-maven-plugin本身并不支持’-keepdirectories’选项!

尊龙官方平台的解决方案


如果要支持该选项,需要添加依赖,使用其它版本的proguard

                <dependencies> <dependency><groupid>net.sf.proguardgroupid><artifactid>proguardartifactid>  <version>4.4version><scope>runtimescope>dependency>dependencies>

注意,这里使用4.4版本的,有文章中使用4.8版本来混淆,但是在maven的仓库中http://repo1.maven.org/maven2/net/sf/proguard/proguard/
找不到4.8的版本。


http://www.ngui.cc/el/5128048.html

相关文章

'build.plugins.plugin.version' for com.pyx4me:proguard-maven-plugin is missing. @ line 42, column 12

‘build.plugins.plugin.version’ for com.pyx4me:proguard-maven-plugin is missing. line 42, column 12 执行maven install的时候提示如下警告信息: [warning] [warning] some problems were encountered while building the effective model for xunge-mid…

java.io.ioexception: the input doesn't contain any classes. did you specify the proper '-injars' opt

问题场景 在使用maven proguard打包项目进行混淆时,提示以下错误: [proguard] proguard, version 4.4[proguard] reading input...[proguard] java.io.ioexception: the input doesnt contain any classes. did you specify the proper -injars option…

using platform encoding (gbk actually) to copy filtered resources, i.e. build is platform dependent!

执行maven install打包的时候,提示以下警告信息: [warning] using platform encoding (gbk actually) to copy filtered resources, i.e. build is platform dependent! 解决方法: 打开项目属性》resources,按下图修改。 保存后重新执行maven install 发现警告依然存…

unrecognised tag: 'encoding' (position: start_tag seen .../version\r\n\t\t\t\tencoding... @12:15

执行maven install打包的时候,出现以下错误信息: [info] scanning for projects... [error] the build could not read 1 project -> [help 1] [error] [error] the project pro.test:pro-test:0.0.1-snapshot (f:\workspaces\pro-test\pom.xml…

error assembling war: webxml attribute is required (or pre-existing web-inf/web.xml if executing in

执行maven install打包的时候,出现以下错误信息: [error] failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project pro-test: error assembling war: webxml attribute is required (or pre-existing web…

type name is discouraged. by convention, java type names usually start with an uppercase letter

在eclipse中添加类的时候,提示如下信息: type name is discouraged. by convention, java type names usually start with an uppercase letter 如下图: 原因是输入的类名“name”首字母没有大写,把首字母改为大写的就好了。…

error: the input doesn't contain any classes. did you specify the proper '-injars' options?

执行maven install打包的时候,出现以下错误信息: [proguard] proguard, version 4.4[proguard] reading program war [f:\workspaces\pro-test\target\pro-test-0.0.1-snapshot.war] (filtered)[proguard] error: the input doesnt contain any classes. did you specify th…

error: unsupported java version '1.8' in line 2 of file 'proguard.conf'

执行maven install打包的时候,出现以下错误信息: [proguard] error: unsupported java version 1.8 in line 2 of file f:\workspaces\pro-test\proguard.conf,[proguard] included from argument number 6 这是因为在proguard.conf文件中显示的指定的java的版本,但是ne…

java.io.ioexception: the same input jar [e:\jre\lib\rt.jar] is specified twice.

执行maven install打包的时候,出现以下错误信息: [info] proguard jar: e:\maven\mvnrespo\net\sf\proguard\proguard-base\5.2\proguard-base-5.2.jar[proguard] proguard, version 5.2[proguard] java.io.ioexception: the same input jar [e:\jre\li…

java.io.ioexception: you have to specify '-keep' options for the shrinking step.

执行maven install打包的时候,出现以下错误信息: [proguard] java.io.ioexception: you have to specify -keep options for the shrinking step.[proguard] at proguard.seedprinter.write(seedprinter.java:60)[proguard] at proguard.progua…
网站地图