Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Execution default-deploy of goal org.apache.maven.plugins:maven-deploy-plugin deploy failed. NullPointerException

While running command

mvn -X clean deploy

I am getting following error

        [INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ something ---
    [DEBUG] [buildinfo] Resolved artifact: org.apache.maven.plugins:maven-deploy-plugin:pom:2.7:build from: team (http://myrepo/maven/m2repos, releases+snapshots) Context is: plugin
    [DEBUG] [buildinfo] Resolved artifact: org.apache.maven.plugins:maven-deploy-plugin:jar:2.7:build from: team (http://myrepo/maven/m2repos, releases+snapshots) Context is: plugin
    [DEBUG] [buildinfo] Resolved artifact: junit:junit:jar:3.8.1:build from: C:\Users\user\.m2\repository (enhanced) Context is: plugin
    [DEBUG] [buildinfo] Resolved artifact: org.codehaus.plexus:plexus-utils:jar:1.5.6:build from: C:\Users\user\.m2\repository (enhanced) Context is: plugin
    [INFO] Uploading: scp://myrepo/export/maven/m2repos/com/team/myproject/10.8/myproject-10.8.war
    [INFO] Uploaded: scp://myrepo/export/maven/m2repos/com/team/myproject/10.8/myproject-10.8.war (162384 KB at 23020.0 KB/sec)
    [INFO] Uploading: scp://myrepo/export/maven/m2repos/com/team/myproject/10.8/myproject-10.8.pom
    [INFO] Uploaded: scp://myrepo/export/maven/m2repos/com/team/myproject/10.8/myproject-10.8.pom (46 KB at 27.3 KB/sec)
    [INFO] Downloading: scp://myrepo/export/maven/m2repos/com/team/myproject/maven-metadata.xml
    [INFO] Downloaded: scp://myrepo/export/maven/m2repos/com/team/myproject/maven-metadata.xml (19 KB at 162.1 KB/sec)
    [INFO] Uploading: scp://myrepo/export/maven/m2repos/com/team/myproject/maven-metadata.xml
    [INFO] Uploaded: scp://myrepo/export/maven/m2repos/com/team/myproject/maven-metadata.xml (19 KB at 12.6 KB/sec)
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 9:07.223s
    [INFO] Finished at: Thu Apr 27 21:40:53 PDT 2017
    [INFO] Final Memory: 54M/568M
    [INFO] ------------------------------------------------------------------------
    Waiting for Jenkins to finish collecting data
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project myproject: Execution default-deploy of goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy failed. NullPointerException -> [Help 1]
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project myproject: Execution default-deploy of goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy failed.
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
        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.jvnet.hudson.maven3.launcher.Maven31Launcher.main(Maven31Launcher.java:132)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
        at jenkins.maven3.agent.Maven31Main.launch(Maven31Main.java:185)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at hudson.maven.Maven3Builder.call(Maven3Builder.java:136)
        at hudson.maven.Maven3Builder.call(Maven3Builder.java:71)
        at hudson.remoting.UserRequest.perform(UserRequest.java:153)
        at hudson.remoting.UserRequest.perform(UserRequest.java:50)
        at hudson.remoting.Request$2.run(Request.java:332)
        at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
    Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-deploy of goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy failed.
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:115)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        ... 30 more
    Caused by: java.lang.NullPointerException
        at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:178)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
        ... 31 more
    [ERROR] 
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR] 
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

If i look at my maven repo, all files are already uploaded with build as seen in log (it says uploaded for files), But at last build status failed with nullpointer exception. I have no clue even after enabling debug mode. Any help please.

like image 492
vishal sahasrabuddhe Avatar asked Oct 29 '22 08:10

vishal sahasrabuddhe


1 Answers

Upgrading to recent version of maven-deploy-plugin solved the issue for me.

E.g.:

<build>
    <plugins>
        <plugin>
            <artifactId>maven-deploy-plugin</artifactId>
            <version>3.0.0-M1</version>
        </plugin>
    </plugins>
</build>
like image 143
dedek Avatar answered Nov 09 '22 07:11

dedek