Return-Path: X-Original-To: apmail-maven-issues-archive@minotaur.apache.org Delivered-To: apmail-maven-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 661CA1016A for ; Thu, 1 Aug 2013 07:03:24 +0000 (UTC) Received: (qmail 27621 invoked by uid 500); 1 Aug 2013 07:03:23 -0000 Delivered-To: apmail-maven-issues-archive@maven.apache.org Received: (qmail 27334 invoked by uid 500); 1 Aug 2013 07:03:18 -0000 Mailing-List: contact issues-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list issues@maven.apache.org Received: (qmail 27326 invoked by uid 99); 1 Aug 2013 07:03:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Aug 2013 07:03:17 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [199.193.192.100] (HELO codehaus01.managed.contegix.com) (199.193.192.100) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Aug 2013 07:03:13 +0000 Received: from codehaus01 (localhost.localdomain [127.0.0.1]) by codehaus01.managed.contegix.com (Postfix) with ESMTP id BB2B0B1069 for ; Thu, 1 Aug 2013 02:02:52 -0500 (CDT) Date: Thu, 1 Aug 2013 02:02:52 -0500 (CDT) From: "Herve Boutemy (JIRA)" To: issues@maven.apache.org Message-ID: In-Reply-To: References: Subject: [jira] (MSITE-695) java.lang.NullPointerException in org.apache.maven.plugins.site.SiteStageDeployMojo.getTopMostParentWithSameStagingSiteURL MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 22cf62d5d84cf5bea94eb3b65e0ebd09 X-Virus-Checked: Checked by ClamAV on apache.org [ https://jira.codehaus.org/browse/MSITE-695?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=329900#comment-329900 ] Herve Boutemy commented on MSITE-695: ------------------------------------- ok, this time, I can reproduce and even understand the failure and propose a workaround first, the workaround: don't use -DstagingSiteURL=... but write the value in pom (either directly or in a profile) this case, where the value is set on CLI but not in the pom, was omitted in code: now I understand how the code was returning null but this wasn't expected (and I couldn't even imagine how to get such a case) then I'll fix the issue in next plugin version: due to some other changes, actual trunk won't fail with NPE, but it won't calculate right staging url > java.lang.NullPointerException in org.apache.maven.plugins.site.SiteStageDeployMojo.getTopMostParentWithSameStagingSiteURL > -------------------------------------------------------------------------------------------------------------------------- > > Key: MSITE-695 > URL: https://jira.codehaus.org/browse/MSITE-695 > Project: Maven 2.x and 3.x Site Plugin > Issue Type: Bug > Components: site:stage(-deploy) > Affects Versions: 3.2, 3.3 > Environment: Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 08:51:28-0500) > Maven home: C:\Java\apache-maven-3.0.5\bin\.. > Java version: 1.7.0_25, vendor: Oracle Corporation > Java home: C:\Program Files\Java\jdk1.7.0_25\jre > Default locale: en_US, platform encoding: Cp1252 > OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows" > and > C:\vcs\svn\apache\log4j2\trunk>C:\Java\apache-maven-3.1.0\bin\mvn.bat -version > Apache Maven 3.1.0 (893ca28a1da9d5f51ac03827af98bb730128f9f2; 2013-06-27 22:15:32-0400) > Maven home: C:\Java\apache-maven-3.1.0\bin\.. > Java version: 1.7.0_25, vendor: Oracle Corporation > Java home: C:\Program Files\Java\jdk1.7.0_25\jre > Default locale: en_US, platform encoding: Cp1252 > OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows" > Reporter: Gary Gregory > Priority: Blocker > > Checkout log4j 2 from: > https://svn.apache.org/repos/asf/logging/log4j/log4j2/trunk > The HEAD of trunk is currently revision 1504131. > Run: > mvn clean site > Get: > {noformat}[INFO] ------------------------------------------------------------------------ > [INFO] BUILD FAILURE > [INFO] ------------------------------------------------------------------------ > [INFO] Total time: 3.724s > [INFO] Finished at: Wed Jul 17 12:43:47 EDT 2013 > [INFO] Final Memory: 22M/213M > [INFO] ------------------------------------------------------------------------ > [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:stage-deploy (default-cli) on project log4j: Execution default-cli of goal org.apache.maven.plugins:maven-site-plugin:3.3:stage-deploy failed. NullPointerException -> [Help 1] > org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:stage-deploy (default-cli) on project log4j: Execution default-cli of goal org.apache.maven.plugins:maven-site-plugin:3.3:stage-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:318) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:153) > 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:606) > at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) > at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) > at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:414) > at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:357) > Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.apache.maven.plugins:maven-site-plugin:3.3:stage-deploy failed. > at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:115) > at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) > ... 19 more > Caused by: java.lang.NullPointerException > at org.apache.maven.plugins.site.SiteStageDeployMojo.getTopMostParentWithSameStagingSiteURL(SiteStageDeployMojo.java:144) > at org.apache.maven.plugins.site.SiteStageDeployMojo.determineTopDistributionManagementSiteUrl(SiteStageDeployMojo.java:102) > at org.apache.maven.plugins.site.AbstractDeployMojo.getTopDistributionManagementSiteUrl(AbstractDeployMojo.java:207) > at org.apache.maven.plugins.site.AbstractDeployMojo.getDeployModuleDirectory(AbstractDeployMojo.java:249) > at org.apache.maven.plugins.site.AbstractDeployMojo.deploy(AbstractDeployMojo.java:320) > at org.apache.maven.plugins.site.AbstractDeployMojo.deployTo(AbstractDeployMojo.java:281) > at org.apache.maven.plugins.site.AbstractDeployMojo.execute(AbstractDeployMojo.java:163) > at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106) > ... 20 more > [ERROR] > [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{noformat} > Version 3.0 is fine. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira