multiproject maven2: getting the site to work

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:
  1. <distributionManagement>
  2.   <site>
  3.     <id>maven.apache.org</id>
  4.     <url>scp://maven.apache.org/deploy/path</url> 
  5.   </site>
  6. </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”

  1. No Comments

Leave a Reply





About

Welcome to the weblog of Peter Maas. Here you'll find various posts related to stuff I like (like my kids and espresso) and stuff I do (like developing software).

JavaOne 2008 Pictures


Community One Keynote alcatraz Stage being build in the nearby park smashmouth Okke en Rudie javaone2008 keynote Joshua Bloch at JavaOne2008 pub Acme Anvile at CommunityOne Keynote Tim Bray introducing the (J)Ruby panel Greenland Rudie Hotel room Golden Gate nearby hotel Scribbled Sun Logo javaone 2008 goodybag Charles Nutter & Guillaume Laforge Stretched Limo sea_lion
View more photos >

Categories



Meld u aan voor PayPal en begin direct met het accepteren van creditcardbetalingen.