You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Carl Wilund (JIRA)" <ji...@codehaus.org> on 2011/01/23 19:22:58 UTC

[jira] Created: (MSITE-546) "container" field of SiteDeployMojo not populated correctly -> NPE with servers containing configuration

"container" field of SiteDeployMojo not populated correctly -> NPE with servers containing configuration
--------------------------------------------------------------------------------------------------------

                 Key: MSITE-546
                 URL: http://jira.codehaus.org/browse/MSITE-546
             Project: Maven 2.x and 3.x Site Plugin
          Issue Type: Bug
          Components: site:deploy
    Affects Versions: 3.0-beta-3
            Reporter: Carl Wilund


In SiteDeployMojo, the field "container" is not populated correctly (version skew with @Requirement?). When configureWagon is subsequently called, IFF the site deploy server has an entry in settings.xml AND contains a "configuration" subelement, there will be a NullPointerException thrown (line 474) when container.lookup is called. 
Simple repro:

settings.xml: 
...
<server>
      <id>bogus</id>
      <username>bogus</username>
      <password>bogus</password>      
      <configuration>
      </configuration>
    </server>
...

pom.xml:
...
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-site-plugin</artifactId>
				<version>3.0-beta-3</version>
			</plugin>
		</plugins>
	</build>
	<distributionManagement>
		<site>
			<id>bogus</id>
			<name>Bogus</name>
			<url>sftp://bogus.bogus.org/bogus</url>
		</site>
	</distributionManagement>
...

While this should obviously not work, it should not NPE at line 474.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MSITE-546) "container" field of SiteDeployMojo not populated correctly -> NPE with servers containing configuration

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSITE-546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=253243#action_253243 ] 

Olivier Lamy commented on MSITE-546:
------------------------------------

more details here http://s.apache.org/QRQ

> "container" field of SiteDeployMojo not populated correctly -> NPE with servers containing configuration
> --------------------------------------------------------------------------------------------------------
>
>                 Key: MSITE-546
>                 URL: http://jira.codehaus.org/browse/MSITE-546
>             Project: Maven 2.x and 3.x Site Plugin
>          Issue Type: Bug
>          Components: Maven 3, site:deploy
>    Affects Versions: 3.0-beta-3
>            Reporter: Carl Wilund
>            Assignee: Olivier Lamy
>
> In SiteDeployMojo, the field "container" is not populated correctly (version skew with @Requirement?). When configureWagon is subsequently called, IFF the site deploy server has an entry in settings.xml AND contains a "configuration" subelement, there will be a NullPointerException thrown (line 474) when container.lookup is called. 
> Simple repro:
> settings.xml: 
> ...
> <server>
>       <id>bogus</id>
>       <username>bogus</username>
>       <password>bogus</password>      
>       <configuration>
>       </configuration>
>     </server>
> ...
> pom.xml:
> ...
> 	<build>
> 		<plugins>
> 			<plugin>
> 				<groupId>org.apache.maven.plugins</groupId>
> 				<artifactId>maven-site-plugin</artifactId>
> 				<version>3.0-beta-3</version>
> 			</plugin>
> 		</plugins>
> 	</build>
> 	<distributionManagement>
> 		<site>
> 			<id>bogus</id>
> 			<name>Bogus</name>
> 			<url>sftp://bogus.bogus.org/bogus</url>
> 		</site>
> 	</distributionManagement>
> ...
> While this should obviously not work, it should not NPE at line 474.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MSITE-546) "container" field of SiteDeployMojo not populated correctly -> NPE with servers containing configuration

Posted by "Lukas Theussl (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MSITE-546?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukas Theussl updated MSITE-546:
--------------------------------

    Component/s: Maven 3

Seems to be a m3 problem, it works with maven 2.2.1 and latest site plugin.

> "container" field of SiteDeployMojo not populated correctly -> NPE with servers containing configuration
> --------------------------------------------------------------------------------------------------------
>
>                 Key: MSITE-546
>                 URL: http://jira.codehaus.org/browse/MSITE-546
>             Project: Maven 2.x and 3.x Site Plugin
>          Issue Type: Bug
>          Components: Maven 3, site:deploy
>    Affects Versions: 3.0-beta-3
>            Reporter: Carl Wilund
>
> In SiteDeployMojo, the field "container" is not populated correctly (version skew with @Requirement?). When configureWagon is subsequently called, IFF the site deploy server has an entry in settings.xml AND contains a "configuration" subelement, there will be a NullPointerException thrown (line 474) when container.lookup is called. 
> Simple repro:
> settings.xml: 
> ...
> <server>
>       <id>bogus</id>
>       <username>bogus</username>
>       <password>bogus</password>      
>       <configuration>
>       </configuration>
>     </server>
> ...
> pom.xml:
> ...
> 	<build>
> 		<plugins>
> 			<plugin>
> 				<groupId>org.apache.maven.plugins</groupId>
> 				<artifactId>maven-site-plugin</artifactId>
> 				<version>3.0-beta-3</version>
> 			</plugin>
> 		</plugins>
> 	</build>
> 	<distributionManagement>
> 		<site>
> 			<id>bogus</id>
> 			<name>Bogus</name>
> 			<url>sftp://bogus.bogus.org/bogus</url>
> 		</site>
> 	</distributionManagement>
> ...
> While this should obviously not work, it should not NPE at line 474.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (MSITE-546) "container" field of SiteDeployMojo not populated correctly -> NPE with servers containing configuration

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MSITE-546?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Lamy closed MSITE-546.
------------------------------

       Resolution: Fixed
    Fix Version/s: 3.0-beta-4

fixed rev [1080389|http://svn.apache.org/viewvc?rev=1080389&view=rev]

> "container" field of SiteDeployMojo not populated correctly -> NPE with servers containing configuration
> --------------------------------------------------------------------------------------------------------
>
>                 Key: MSITE-546
>                 URL: http://jira.codehaus.org/browse/MSITE-546
>             Project: Maven 2.x and 3.x Site Plugin
>          Issue Type: Bug
>          Components: Maven 3, site:deploy
>    Affects Versions: 3.0-beta-3
>            Reporter: Carl Wilund
>            Assignee: Olivier Lamy
>             Fix For: 3.0-beta-4
>
>
> In SiteDeployMojo, the field "container" is not populated correctly (version skew with @Requirement?). When configureWagon is subsequently called, IFF the site deploy server has an entry in settings.xml AND contains a "configuration" subelement, there will be a NullPointerException thrown (line 474) when container.lookup is called. 
> Simple repro:
> settings.xml: 
> ...
> <server>
>       <id>bogus</id>
>       <username>bogus</username>
>       <password>bogus</password>      
>       <configuration>
>       </configuration>
>     </server>
> ...
> pom.xml:
> ...
> 	<build>
> 		<plugins>
> 			<plugin>
> 				<groupId>org.apache.maven.plugins</groupId>
> 				<artifactId>maven-site-plugin</artifactId>
> 				<version>3.0-beta-3</version>
> 			</plugin>
> 		</plugins>
> 	</build>
> 	<distributionManagement>
> 		<site>
> 			<id>bogus</id>
> 			<name>Bogus</name>
> 			<url>sftp://bogus.bogus.org/bogus</url>
> 		</site>
> 	</distributionManagement>
> ...
> While this should obviously not work, it should not NPE at line 474.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MSITE-546) "container" field of SiteDeployMojo not populated correctly -> NPE with servers containing configuration

Posted by "Marcin Kuthan (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSITE-546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=263420#action_263420 ] 

Marcin Kuthan commented on MSITE-546:
-------------------------------------

Hi Olivier

I've verified the 3.0-beta-4-SNAPSHOT and the NPE is still thrown:

{code}
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.0-beta-4-SNAPSHOT:stage-deploy (default-cli) on project corporate-pom: Execution default-cli of goal org.apache.maven.plugins:maven-site-plugin:3.0-beta-4-SNAPSHOT:stage-deploy failed. NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.0-beta-4-SNAPSHOT:stage-deploy (default-cli) on project corporate-pom: Execution default-cli of goal org.apache.maven.plugins:maven-site-plugin:3.0-beta-4-SNAPSHOT:stage-deploy failed.
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
        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:319)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
        at 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)
        at java.lang.reflect.Method.invoke(Method.java:597)
        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:409)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.apache.maven.plugins:maven-site-plugin:3.0-beta-4-SNAPSHOT:stage-deploy failed.
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        ... 19 more
Caused by: java.lang.NullPointerException
        at org.apache.maven.plugins.site.SiteDeployMojo.configureWagon(SiteDeployMojo.java:474)
        at org.apache.maven.plugins.site.SiteStageDeployMojo.deployStagingSite(SiteStageDeployMojo.java:185)
        at org.apache.maven.plugins.site.SiteStageDeployMojo.execute(SiteStageDeployMojo.java:145)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
        ... 20 more
{code}

For reference settings.xml fragment:

{code}
<server>
    <id>hostname</id>
    <username>username</username>
    <password>password</password>
    <configuration>
        <!-- Disable host checking -->
        <knownHostsProvider implementation="org.apache.maven.wagon.providers.ssh.knownhost.NullKnownHostProvider"> 
            <hostKeyChecking>no</hostKeyChecking> 
        </knownHostsProvider> 
    </configuration> 
</server>
{code}

Should I open the new issue?

Thanks,
Marcin


> "container" field of SiteDeployMojo not populated correctly -> NPE with servers containing configuration
> --------------------------------------------------------------------------------------------------------
>
>                 Key: MSITE-546
>                 URL: http://jira.codehaus.org/browse/MSITE-546
>             Project: Maven 2.x and 3.x Site Plugin
>          Issue Type: Bug
>          Components: Maven 3, site:deploy
>    Affects Versions: 3.0-beta-3
>            Reporter: Carl Wilund
>            Assignee: Olivier Lamy
>             Fix For: 3.0-beta-4
>
>
> In SiteDeployMojo, the field "container" is not populated correctly (version skew with @Requirement?). When configureWagon is subsequently called, IFF the site deploy server has an entry in settings.xml AND contains a "configuration" subelement, there will be a NullPointerException thrown (line 474) when container.lookup is called. 
> Simple repro:
> settings.xml: 
> ...
> <server>
>       <id>bogus</id>
>       <username>bogus</username>
>       <password>bogus</password>      
>       <configuration>
>       </configuration>
>     </server>
> ...
> pom.xml:
> ...
> 	<build>
> 		<plugins>
> 			<plugin>
> 				<groupId>org.apache.maven.plugins</groupId>
> 				<artifactId>maven-site-plugin</artifactId>
> 				<version>3.0-beta-3</version>
> 			</plugin>
> 		</plugins>
> 	</build>
> 	<distributionManagement>
> 		<site>
> 			<id>bogus</id>
> 			<name>Bogus</name>
> 			<url>sftp://bogus.bogus.org/bogus</url>
> 		</site>
> 	</distributionManagement>
> ...
> While this should obviously not work, it should not NPE at line 474.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MSITE-546) "container" field of SiteDeployMojo not populated correctly -> NPE with servers containing configuration

Posted by "Lukas Theussl (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSITE-546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=263433#action_263433 ] 

Lukas Theussl commented on MSITE-546:
-------------------------------------

I don't think you are actually running 3.0-beta-4-SNAPSHOT, in the current dev version there is no line number 474 in SiteDeployMojo: http://svn.apache.org/viewvc/maven/plugins/branches/maven-site-plugin-3.x/src/main/java/org/apache/maven/plugins/site/SiteDeployMojo.java?view=markup

> "container" field of SiteDeployMojo not populated correctly -> NPE with servers containing configuration
> --------------------------------------------------------------------------------------------------------
>
>                 Key: MSITE-546
>                 URL: http://jira.codehaus.org/browse/MSITE-546
>             Project: Maven 2.x and 3.x Site Plugin
>          Issue Type: Bug
>          Components: Maven 3, site:deploy
>    Affects Versions: 3.0-beta-3
>            Reporter: Carl Wilund
>            Assignee: Olivier Lamy
>             Fix For: 3.0-beta-4
>
>
> In SiteDeployMojo, the field "container" is not populated correctly (version skew with @Requirement?). When configureWagon is subsequently called, IFF the site deploy server has an entry in settings.xml AND contains a "configuration" subelement, there will be a NullPointerException thrown (line 474) when container.lookup is called. 
> Simple repro:
> settings.xml: 
> ...
> <server>
>       <id>bogus</id>
>       <username>bogus</username>
>       <password>bogus</password>      
>       <configuration>
>       </configuration>
>     </server>
> ...
> pom.xml:
> ...
> 	<build>
> 		<plugins>
> 			<plugin>
> 				<groupId>org.apache.maven.plugins</groupId>
> 				<artifactId>maven-site-plugin</artifactId>
> 				<version>3.0-beta-3</version>
> 			</plugin>
> 		</plugins>
> 	</build>
> 	<distributionManagement>
> 		<site>
> 			<id>bogus</id>
> 			<name>Bogus</name>
> 			<url>sftp://bogus.bogus.org/bogus</url>
> 		</site>
> 	</distributionManagement>
> ...
> While this should obviously not work, it should not NPE at line 474.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MSITE-546) "container" field of SiteDeployMojo not populated correctly -> NPE with servers containing configuration

Posted by "Marcin Kuthan (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSITE-546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=263579#action_263579 ] 

Marcin Kuthan commented on MSITE-546:
-------------------------------------

Thanks Lukas for quick reply. You are right, the older snapshot was used (my Artifactory installation does not support M3 metadata files and served the outdated plugin). 

Now I get another exception, but the exception is not related to the site plugin.

{code}
Caused by: org.codehaus.plexus.component.configurator.ComponentConfigurationException: ClassNotFoundException: Class name which was explicitly given in configuration using 'implementation' attribute: 'org.apache.maven.wagon.providers.ssh.knownhost.NullKnownHostProvider' cannot be loaded
{code} 

Thanks again.

> "container" field of SiteDeployMojo not populated correctly -> NPE with servers containing configuration
> --------------------------------------------------------------------------------------------------------
>
>                 Key: MSITE-546
>                 URL: http://jira.codehaus.org/browse/MSITE-546
>             Project: Maven 2.x and 3.x Site Plugin
>          Issue Type: Bug
>          Components: Maven 3, site:deploy
>    Affects Versions: 3.0-beta-3
>            Reporter: Carl Wilund
>            Assignee: Olivier Lamy
>             Fix For: 3.0-beta-4
>
>
> In SiteDeployMojo, the field "container" is not populated correctly (version skew with @Requirement?). When configureWagon is subsequently called, IFF the site deploy server has an entry in settings.xml AND contains a "configuration" subelement, there will be a NullPointerException thrown (line 474) when container.lookup is called. 
> Simple repro:
> settings.xml: 
> ...
> <server>
>       <id>bogus</id>
>       <username>bogus</username>
>       <password>bogus</password>      
>       <configuration>
>       </configuration>
>     </server>
> ...
> pom.xml:
> ...
> 	<build>
> 		<plugins>
> 			<plugin>
> 				<groupId>org.apache.maven.plugins</groupId>
> 				<artifactId>maven-site-plugin</artifactId>
> 				<version>3.0-beta-3</version>
> 			</plugin>
> 		</plugins>
> 	</build>
> 	<distributionManagement>
> 		<site>
> 			<id>bogus</id>
> 			<name>Bogus</name>
> 			<url>sftp://bogus.bogus.org/bogus</url>
> 		</site>
> 	</distributionManagement>
> ...
> While this should obviously not work, it should not NPE at line 474.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira