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:
[xml]
[/xml]
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!