在maven中使用jarjajr时为Nullpointer

时间:2014-05-27 13:32:40

标签: maven jarjar

当我正在建造maven时:

Failed to execute goal org.sonatype.plugins:jarjar-maven-plugin:1.9:jarjar (default) on project myproject: Unable to JarJar: null cause: null: NullPointerException

我的pom.xml文件的片段:

        <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>jarjar-maven-plugin</artifactId>
            <executions>
              <execution>
                <phase>package</phase>
                <goals>
                  <goal>jarjar</goal>
                </goals>
                <configuration>
                <rules>
                </rules>
                <zaps>
                    <zap>com.mypackage.**</zap>
                </zaps>
                </configuration>
              </execution>
            </executions>
        </plugin>

使用-e -X选项编辑日志:

[ERROR] Failed to execute goal org.sonatype.plugins:jarjar-maven-plugin:1.9:jarjar (default) on project my.project: Unable to JarJar: null cause: null: NullPointerException ->
[Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonatype.plugins:jarjar-maven-plugin:1.9:jarjar (default) on project my.project: Unable to JarJar: null cause: null
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to JarJar: null cause: null
        at com.tonicsystems.jarjar.JarJarMojo.execute(JarJarMojo.java:262)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        ... 19 more
Caused by: java.lang.NullPointerException
        at com.tonicsystems.jarjar.JarJarMojo.execute(JarJarMojo.java:131)
        ... 21 more
[ERROR]
[ERROR]

0 个答案:

没有答案