Book Image

Apache Maven Cookbook

Book Image

Apache Maven Cookbook

Overview of this book

Table of Contents (18 chapters)
Apache Maven Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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>
          <directoryPermissions>775</directoryPermissions>
        </server...