Always deploy a default phased site for a multi-module site?

I'm struggling to understand the complexity of deploying a multi-module maven site with working links. This is complicated by what I am deploying to Google Code using maven-scm-provider-hg .

According to the docs, I have to run mvn site:site site:stage to get a full working site. However, when I run mvn site:deploy , it deploys the parent pom node, which is empty, with the exception of images and css folders.

Next I will try mvn site:stage-deploy . This fails because it adds staging/ to the URL, which, as I use Google code, causes an error because http://code.google.com/p/myproject.site/staging not a repository. This is also not a long-term solution, as I am sure that the maven release plugin works site:site .

What is the official way to deploy a complete multi-module site with working links?

+4
source share
1 answer

In order to start the assembly of the site using the assembly of several modules, everything is ready, you must start the phase site of the site’s life cycle - to deploy, and not just the purpose of the site plugin.

So I ran

 mvn clean install site-deploy 

or to deploy artifacts and a site

 mvn clean deploy site-deploy 

And, of course, you must properly configure the installation in terms of distribution management. In addition, you want all modules to have the same directory name as their artifactId, and you set site.xml with the appropriate links, and so on, as described on the site plugin site.

Depending on the site’s deployment protocol, you may also need to add an assembly extension (for example, if you use dav)

This, of course, takes a little time, but it works. I would also recommend using the latest version of the site plugin (3.1) and Maven (3.0.4).

0
source

All Articles