maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Herve Boutemy (JIRA)" <j...@codehaus.org>
Subject [jira] (MSITE-695) java.lang.NullPointerException in org.apache.maven.plugins.site.SiteStageDeployMojo.getTopMostParentWithSameStagingSiteURL
Date Fri, 02 Aug 2013 11:54:52 GMT

    [ https://jira.codehaus.org/browse/MSITE-695?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=329900#comment-329900
] 

Herve Boutemy edited comment on MSITE-695 at 8/2/13 6:54 AM:
-------------------------------------------------------------

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). Or even do "mvn site:stage", since you're not deploying to remote location

this case, where the value is set on CLI but not in the pom, was omitted in stage-deploy 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
                
      was (Author: hboutemy):
    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 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
>             Fix For: 3.4
>
>
> 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

Mime
View raw message