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.

执行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 doesn't contain any classes. Did you specify the proper '-injars' options?

由于这个是一个测试工程,还没有添加任何的类,所以虽然POM文件中指定了“injars”参数,还是产生了此错误。

“injars”参数设置参考:

            <plugin>
                <groupId>com.pyx4me</groupId>
                <artifactId>proguard-maven-plugin</artifactId>
                <version>2.0.4</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>proguard</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <obfuscate>true</obfuscate>
                    <proguardInclude>${basedir}/proguard.conf</proguardInclude>
                    <!-- 添加依赖,这里你可以按你的需要修改 -->
                    <libs>
                        <lib>${java.home}/lib/rt.jar</lib>
                        <lib>lib/jsp-api.jar</lib>
                        <lib>lib/servlet-api.jar</lib>
                    </libs>
                    <addMavenDescriptor>false</addMavenDescriptor>
                    <injar>${project.build.finalName}.war</injar>
                    <outjar>${project.build.finalName}-pg.war</outjar>
                    <outputDirectory>${project.build.directory}</outputDirectory>
                </configuration>
                <dependencies> 
                    <!-- 使用4.4版本来混淆 -->
                    <dependency>
                        <groupId>net.sf.proguard</groupId>
                        <artifactId>proguard</artifactId>  
                        <version>4.4</version>
                        <scope>runtime</scope>
                    </dependency>
                </dependencies>
            </plugin>
目录
相关文章
|
5天前
|
安全 Java 应用服务中间件
A configuration error occurred during startup.Please verify the preference field with the prompt: To
A configuration error occurred during startup.Please verify the preference field with the prompt: To
17 0
|
10月前
|
Linux
ERROR: 2 matches found based on name: network product-server_default is ambiguous
ERROR: 2 matches found based on name: network product-server_default is ambiguous
94 0
|
机器学习/深度学习 数据采集
ValueError: Found input variables with inconsistent numbers of samples: [140, 1120] 怎么解决?
这个错误通常发生在机器学习模型的训练中,它表示输入数据的样本数量不一致。在你的情况下,你的输入数据中有两个变量,一个变量的样本数量为140,另一个变量的样本数量为1120,因此这个错误就出现了。 为了解决这个问题,你需要确保所有输入变量的样本数量是相同的。你可以通过以下几种方式来解决这个问题: 检查数据:检查数据是否正确加载,可能会导致数据样本数量不一致。 数据清洗:检查是否有重复的样本或者缺失的样本,如果有则需要对数据进行清洗。 数据对齐:如果你使用了多个数据源,那么你需要对它们进行对齐以确保它们的样本数量一致。 数据重采样:如果数据中有不均衡的样本数量,你可以考虑使用数据重采样方
672 0
config.guess: unable to guess system type、config.sub: missing argument
config.guess: unable to guess system type、config.sub: missing argument
102 0
Duplicate methods named spliterator with the parameters () and () are inherited from the types Colle
Duplicate methods named spliterator with the parameters () and () are inherited from the types Colle
52 0
成功解决ValueError: Found input variables with inconsistent numbers of samples: [86, 891]
成功解决ValueError: Found input variables with inconsistent numbers of samples: [86, 891]
|
应用服务中间件 Android开发
a configuration error occurred during startup. place verify the preference field whth the prompt:TomcatJDK name:
a configuration error occurred during startup. place verify the preference field whth the prompt:TomcatJDK name:
107 0
a configuration error occurred during startup. place verify the preference field whth the prompt:TomcatJDK name:
How to resolve warning message Access restriction -The type Resource is not accessible
How to resolve warning message Access restriction -The type Resource is not accessible
117 0
How to resolve warning message Access restriction -The type Resource is not accessible
How is target My note application rendered - renderManager
Created by Wang, Jerry, last modified on May 18, 2015
104 0
How is target My note application rendered - renderManager
|
Android开发
解决Error:All flavors must now belong to a named flavor dimension
前言 最近写的项目越来越大,出现了64K问题,所以用了Multidex来突破64K方法数限制,然后为了优化编译速度在build.gradle文件中加入了如下代码 productFlavors { // Define separate dev and prod product flavors.
2867 0