码迷,mamicode.com
首页 > 编程语言 > 详细

Error: The input doesn't contain any classes. Did you specify the proper '-injars' options?

时间:2015-05-10 15:44:14      阅读:653      评论:0      收藏:0      [点我收藏+]

标签:maven   install   error   input   classes   

执行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>

Error: The input doesn't contain any classes. Did you specify the proper '-injars' options?

标签:maven   install   error   input   classes   

原文地址:http://blog.csdn.net/testcs_dn/article/details/45621045

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!