O'Reilly logo

Apache Maven Cookbook by Raghuram Bharathan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Deploying a site

Once a site report is generated, it needs to be published. While this can be done manually, Maven also provides facilities to do this. Let us see how.

Getting ready

To publish a site, you need to have access to the web server where the site has to be deployed.

How to do it...

To deploy a site, use the following steps:

  1. Add the following code to your pom.xml file. This could also be added in settings.xml:
      <distributionManagement>
        <site>
          <id>myorg</id>
          <url>scp://www.myorg.com/project/</url>
        </site>
      </distributionManagement>
  2. For the corresponding ID, add the relevant username and password in your settings.xml file:
    <servers> <server> <id>myorg</id> <username>username</username> <password>password</password> <filePermissions>664</filePermissions> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required