multiproject maven2: getting the site to work
Published by peter November 14th, 2007 in java, maven.When generating a project site for a multiproject setup as described in my previous post many people run into the same problem. The links to the different modules don't work when you use the 'site:site' target. A couple of solutions exist which 'solve' this 'problem' (technically it is a feature).
The actually links are configure correctly when the site is actually being staged or deployed. The following command will stage (generated) the site in the specified location:
mvn site:stage -DstagingDirectory=/Users/peter/Desktop/Wosi/generated_site/
And all links are working fine.
It is also possible to deploy the site to a different server. Configure the target location in the pom:
-
<distributionManagement>
-
<site>
-
<id>maven.apache.org</id>
-
<url>scp://maven.apache.org/deploy/path</url>
-
</site>
-
</distributionManagement>
When running the 'site:deploy' target maven will zip and copy (and afterwards unzip) the generated site to the configured server.
If the ssh keys are configured correctly no passwords are needed; otherwise maven prompts for the ssh password and uses the currently logged in user (which is overridable by using scp://username@hostname/path/). Links will work now as well!




















0 Responses to “multiproject maven2: getting the site to work”
Please Wait
Leave a Reply