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.
To publish a site, you need to have access to the web server where the site has to be deployed.
To deploy a site, use the following steps:
Add the following code to your
pom.xml
file. This could also be added insettings.xml
:<distributionManagement> <site> <id>myorg</id> <url>scp://www.myorg.com/project/</url> </site> </distributionManagement>
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...