Uploaded image for project: 'Maven Site Plugin'
  1. Maven Site Plugin
  2. MSITE-546

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0-beta-3
    • 3.0
    • Maven 3, site:deploy
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              olamy Olivier Lamy
              elcallio Carl Wilund
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: