Already wasted over a day on this, so maybe someone else can give me an
idea how to do it.  There are two parts to this, generating a site of a
multi module project with the correct links and the strange failure I
get when doing a release if site config is present.
 
Genering multi module project and have the sub project links work
correctly...
 
Imagine a multi module project with two modules, built by invoking maven
in the parent directory.  Below are the file locations for the generated
sites without url specified and the link in the parent module's site.
They don't match up for site:site or site:stage-deploy.
 
myproject
myproject/subproject1
myproject/subproject2  (depends on subproject1)
 
mvn site:site
the result is (caps added to targets for emphasis)
 
site files:
myproject/target/site
myproject/subproject1/target/site
myproject/subproject2/target/site
 
links:
myproject/target/site
myproject/target/site/subproject1
myproject/target/site/subproject2
 
myproject   ::{myproject}/target/site   ::
subproject1::{myproject}/subproject1/target/site ::
{myproject}/subproject1
 
 
mvn site:stage-deploy -DstagingDirectory=/tmp/myproject/site
result is:
 
site files:
/tmp/myproject/site/staging
/tmp/myproject/subproject1/staging
/tmp/myproject/subproject2/staging
 
links (note subprojects ordering is switched and link fails):
/tmp/myproject/site/staging
/tmp/myproject/site/staging/subproject1
/tmp/myproject/site/staging/subproject2
 
Weird failure during release:perform =>
 
mvn site:deploy
give links with proper URLs to subproject if their <url> section is not
specified if I add a section like this:
 
  <distributionManagement>
   ...   
      <site>
      <id>myproject-site</id>
      <name>Myproject Site</name>
      <url>file:///tmp/myproject/site</url>
    </site>
  </distributionManagement>
 
This gives me what I want with the major drawback of breaking the
ability to release a new version!!
 
Adding that site section causes release:perform to fail:
mvn clean install  <works>
mvn -B  -Dresume=false -Dmaven.test.skip release:prepare  <works>
mvn -B -Dmaven.test.skip release:perform <FAILS>
 
It fails during release:perform because it can't find subproject1 which
is needed for subproject2 during site:site.
 
Removing the site section again and release:perform works once again.
 
So what is the right approach.  I looked through pom files setting url
in their site section and not one used file://, only scp://  for their
url.  Is that the problem?
 
I need to use relative paths because the site will be hosted with the
builds using cruise control.
 
Paul Sundling
 
  
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to