Maven has a handy site plugin which can generate a website about your Maven project. Once the website is generated, normally it needs to be published to somewhere. A simple web server using Apache httpd or Nginx will be enough. Use a SSH/SCP wagon to upload website files to the server. Or website can be published to AWS S3 using wagon provided by community. Nexus can also host Maven websites. So if you are already using Nexus as internal Maven server, then it's a better choice to use Nexus to host the Maven site.

Add a new site in Nexus

First a new Hosted repository with Provider Site.

!Add a new site in Nexus.

Once new site is added, go to Summary tab and find out the URL of the new site, i.e. http://nexus:8081/nexus/content/sites/myproject.

Update POM file

Maven project's pom.xml needs to be updated to use this site configuration. Add <site> configuration in <distributionManagement> element. See code below:


Please note the protocol dav: before the site URL. WebDAV is used to upload content to the site.

Update Maven settings

Usually Nexus has user authentication. The user's credentials should be added in Maven's settings.xml file. See code below:


The id of <server> must match the id in <distributionManagement>.

Configure Maven site plugin

In the <pluginManagement>, configure Maven site plugin, see code below:


Dependencies wagon-webdav-jackrabbit and slf4j-simple are required.

In <build> configuration, add the WebDAV extension as below:


Publish site

To generate and publish site, run mvn site:site site:stage site:deploy. site:stage goal is required if you project has multiple modules. After publish, you should be able to access the site using the URL.