You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Dave Newton <ne...@yahoo.com> on 2008/09/13 02:52:27 UTC

Multi-module site generation?

Where should I look in TFM/TFW to find a canonical way for a multi-module project to create a complete website including the modules?

Right now I've configured each module's site plugin's <outputDirectory> to point at "../target/site/${artifactId}" and set each modules's <url> to ${artifactId} but this feels hokey and wrong and makes me feel bad about myself.

Should I just assemble the disparate module sites and get them to the final site directory somehow?

Thanks,
Dave


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Multi-module site generation?

Posted by Blimey <Ja...@gmail.com>.
Hi,

just wondering if you were successful in the end as I'm facing a similar
problem,

cheers
 

newton.dave wrote:
> 
> --- On Fri, 9/12/08, Dave Newton lied:
>> Running site-deploy works, as long as I define a file URI
>> that isn't broken. Which I couldn't.
>> 
>> Turns out site:deploy works just fine too (once the sites
>> have been generated, I mean).
> 
> Spoke too soon; I thought it had worked at one point but now the module
> links it's creating point to the parent POM directory + parent artifactId.
> 
> Ah; removing *all* the <url> elements seems to have fixed it; I think my
> root POM's <url> messed up all the others. Curious; I'll look into it
> again tomorrow.
> 
> Thanks again,
> Dave
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Multi-module-site-generation--tp19466376p27026924.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Multi-module site generation?

Posted by Dave Newton <ne...@yahoo.com>.
--- On Fri, 9/12/08, Dave Newton lied:
> Running site-deploy works, as long as I define a file URI
> that isn't broken. Which I couldn't.
> 
> Turns out site:deploy works just fine too (once the sites
> have been generated, I mean).

Spoke too soon; I thought it had worked at one point but now the module links it's creating point to the parent POM directory + parent artifactId.

Ah; removing *all* the <url> elements seems to have fixed it; I think my root POM's <url> messed up all the others. Curious; I'll look into it again tomorrow.

Thanks again,
Dave


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Multi-module site generation?

Posted by Dave Newton <ne...@yahoo.com>.
--- On Fri, 9/12/08, Wendy Smoak wrote:
> http://maven.apache.org/guides/mini/guide-site.html
> 
> (site-deploy is a lifecycle phase, while site:deploy means
> to run one specific goal of the site plugin.)

Oh. Hrm. Something new every day, and all that.

Running site-deploy works, as long as I define a file URI that isn't broken. Which I couldn't.

Turns out site:deploy works just fine too (once the sites have been generated, I mean).

Sheesh :/

Thanks much,
Dave


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Multi-module site generation?

Posted by Wendy Smoak <ws...@gmail.com>.
On Fri, Sep 12, 2008 at 7:17 PM, Dave Newton <ne...@yahoo.com> wrote:

> I've tried site:deploy with the following <distributionManagement> in the top-level POM in the hopes it would all get dumped to a directory in the parent site, but so far no joy; only the parent shows up.

Try 'mvn site-deploy' instead, from a parent which has modules
defined.  It should work.

http://maven.apache.org/guides/mini/guide-site.html

(site-deploy is a lifecycle phase, while site:deploy means to run one
specific goal of the site plugin.)

(You may need an <id> for the site in distribution management.  Wagon
complained when I didn't have one...)

-- 
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Multi-module site generation?

Posted by Dave Newton <ne...@yahoo.com>.
--- On Fri, 9/12/08, Wendy Smoak wrote:
> What are you trying to do by setting those values?  
> Preview it locally before deploying it?

That was the initial goal, but it's likely the final site will be deployed to a local directory location on the CI machine.

I've tried site:deploy with the following <distributionManagement> in the top-level POM in the hopes it would all get dumped to a directory in the parent site, but so far no joy; only the parent shows up.

<distributionManagement>
  <site>
    <url>file://deployed-site</url>
  </site>
</distributionManagement>

The parent and two module POMs are at http://pastebin.com/m1c8573cc.

I'm assuming that there are multiple things wrong with what I'm doing (finally trying to figure out Maven) so any advice/criticisms/etc. are welcome.

I also tried site:stage-deploy, which created the following hierarchy:

target/staging/localhost/MultiModCli/...
                     .../MultiModCore/...
                     .../deployed-site/(the parent project)

So I'd guess I'm just doing (one of many :) things all cow's legs up, 'cuz it's close.

Thanks,
Dave


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Multi-module site generation?

Posted by Wendy Smoak <ws...@gmail.com>.
On Fri, Sep 12, 2008 at 5:52 PM, Dave Newton <ne...@yahoo.com> wrote:
> Where should I look in TFM/TFW to find a canonical way for a multi-module project to create a complete website including the modules?
>
> Right now I've configured each module's site plugin's <outputDirectory> to point at "../target/site/${artifactId}" and set each modules's <url> to ${artifactId} but this feels hokey and wrong and makes me feel bad about myself.
>
> Should I just assemble the disparate module sites and get them to the final site directory somehow?

What are you trying to do by setting those values?  Preview it locally
before deploying it?

The site plugin builds each piece of the site under the module's
'target' directory, but the links won't work from there.  You'll need
to deploy it somewhere for it to all work together.  (I'd say stage
it, but I think some links are still broken using the stage-deploy
goal.)

-- 
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org