尝试使用maven运行时出现Proguard错误

时间:2012-01-08 04:18:09

标签: maven maven-2 maven-plugin maven-3 proguard

有人有一个“proguard-maven-plugin”标准maven配置,可以用于企业Java应用程序吗?有人知道我需要添加配置的4个pom.xml是什么?,我花了很多钱时间尝试使用它,但总是写maven:

  

无法在项目MavenEnterpriseApp-web上执行目标com.pyx4me:proguard-maven-plugin:2.0.4:proguard(默认):Obfuscation failed(result = 1) - > [帮助1]   org.apache.maven.lifecycle.LifecycleExecutionException:无法在项目MavenEnterpriseApp-web上执行目标com.pyx4me:proguard-maven-plugin:2.0.4:proguard(默认):混淆失败(结果= 1)       在org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)       在org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)       在org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)       在org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)       在org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)       在org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)       在org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)       在org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)       在org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)       在org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)       在org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)       在org.apache.maven.cli.MavenCli.main(MavenCli.java:141)       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)       在java.lang.reflect.Method.invoke(Method.java:597)       在org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)       在org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)       在org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)       在org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)   引起:org.apache.maven.plugin.MojoExecutionException:混淆失败(结果= 1)       在com.pyx4me.maven.proguard.ProGuardMojo.proguardMain(ProGuardMojo.java:633)       在com.pyx4me.maven.proguard.ProGuardMojo.execute(ProGuardMojo.java:486)       在org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)       在org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)

我尝试的proguard配置:

 <plugin>
                <groupId>com.pyx4me</groupId>
                <artifactId>proguard-maven-plugin</artifactId>
                <executions>
                   <execution>
                       <phase>package</phase>
                       <goals>
                           <goal>proguard</goal>
                       </goals>
                   </execution>
                </executions>
                <configuration>
                    <inFilter>com.codeInMine.business*</inFilter>
                </configuration>

            </plugin>

1 个答案:

答案 0 :(得分:1)

当我将maven-assembly-plugin从2.1版更新到2.2.2版时,发生了这种情况 在改回2.1后再次工作。