You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Carr, Brian M" <br...@austin.utexas.edu> on 2009/02/27 03:55:35 UTC

Modules navigation area empty with generated content when site:site is run on an aggregator POM

I have a simple aggregator pom which defines a number of modules which are
located in the directory directly beneath them.  The site generated for the
aggregator seems to know that it should care about it's modules (a modules
section appears on the generated target/site/index.html, but it has no items
listed).  The "child" sites has no modules menu item at all (as expected).
I have no site.xml, so I am looking for default behavior here for now.
Below is a minimal example which shows the behavior.

Versions:
Java version: 1.5.0_16
OS name: "mac os x" version: "10.5.6" arch: "i386" Family: "unix"

Tested with both:
Maven 2.0.9 with maven-site-plugin 2.0-beta-6
Maven 2.0.10 with maven-site-plugin 2.0-beta-7

directory layout:

site-test
|-pom.xml
|-site-two
|-\-pom.xml
|-site-three
|-\-pom.xml

site-test/pom.xml:
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.example</groupId>
  <artifactId>site-test</artifactId>
  <name>Top Level Site Test</name>
  <version>1.0-SNAPSHOT</version>
  <packaging>pom</packaging>

  <modules>
    <module>site-two</module>
    <module>site-three</module>
  </modules>
</project>

site-two/pom.xml:
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.example</groupId>
  <artifactId>site-two</artifactId>
  <name>Second Level Site Test</name>
  <version>1.0-SNAPSHOT</version>
  <packaging>jar</packaging>
</project>


Am I missing a critical configuration stanza here?  I can't find anything in
the plugin docs or FAQs which suggest that I need anything if I'm not trying
to customize the output.

--b
______________________________
Brian M. Carr
Identity and Access Management
ITS Applications
University of Texas at Austin
V: 512-232-6419
F: 512-471-5746
brianmcarr@austin.utexas.edu

Re: Modules navigation area empty with generated content when site:site is run on an aggregator POM

Posted by "Carr, Brian M" <br...@austin.utexas.edu>.
Thanks, Dennis.  Actually, it does add them by default, but it appears there
is an obscure bug (?) or at least unexpected behavior where the aggregator
POM also has to be parent POM.  In my case, the aggregator was not a parent
of the modules.  The parent was separate.  Since the parent itself had no
modules, it empties out the modules set in site creation.

It seems that a fix for this is imminent.

It's documented here: http://jira.codehaus.org/browse/MSITE-163


--b

On 3/1/09 2:29 PM, "Dennis Lundberg" <de...@apache.org> wrote:

> The Site Plugin doesn't add links to modules by default. This is
> something you have to configure. Add a small site.xml to your aggregator
> project like this:
> 
> <project>
>   <body>
>     <menu ref="modules" />
>   </body>
> </project>
> 
> See more about the site descriptor here:
> http://maven.apache.org/plugins/maven-site-plugin/examples/sitedescriptor.html
> 
> Carr, Brian M wrote:
>> I have a simple aggregator pom which defines a number of modules which are
>> located in the directory directly beneath them.  The site generated for the
>> aggregator seems to know that it should care about it's modules (a modules
>> section appears on the generated target/site/index.html, but it has no items
>> listed).  The "child" sites has no modules menu item at all (as expected).
>> I have no site.xml, so I am looking for default behavior here for now.
>> Below is a minimal example which shows the behavior.
>> 
>> Versions:
>> Java version: 1.5.0_16
>> OS name: "mac os x" version: "10.5.6" arch: "i386" Family: "unix"
>> 
>> Tested with both:
>> Maven 2.0.9 with maven-site-plugin 2.0-beta-6
>> Maven 2.0.10 with maven-site-plugin 2.0-beta-7
>> 
>> directory layout:
>> 
>> site-test
>> |-pom.xml
>> |-site-two
>> |-\-pom.xml
>> |-site-three
>> |-\-pom.xml
>> 
>> site-test/pom.xml:
>> <project>
>>   <modelVersion>4.0.0</modelVersion>
>>   <groupId>com.example</groupId>
>>   <artifactId>site-test</artifactId>
>>   <name>Top Level Site Test</name>
>>   <version>1.0-SNAPSHOT</version>
>>   <packaging>pom</packaging>
>> 
>>   <modules>
>>     <module>site-two</module>
>>     <module>site-three</module>
>>   </modules>
>> </project>
>> 
>> site-two/pom.xml:
>> <project>
>>   <modelVersion>4.0.0</modelVersion>
>>   <groupId>com.example</groupId>
>>   <artifactId>site-two</artifactId>
>>   <name>Second Level Site Test</name>
>>   <version>1.0-SNAPSHOT</version>
>>   <packaging>jar</packaging>
>> </project>
>> 
>> 
>> Am I missing a critical configuration stanza here?  I can't find anything in
>> the plugin docs or FAQs which suggest that I need anything if I'm not trying
>> to customize the output.
>> 
>> --b
>> ______________________________
>> Brian M. Carr
>> Identity and Access Management
>> ITS Applications
>> University of Texas at Austin
>> V: 512-232-6419
>> F: 512-471-5746
>> brianmcarr@austin.utexas.edu
> 

______________________________
Brian M. Carr
Identity and Access Management
ITS Applications
University of Texas at Austin
V: 512-232-6419
F: 512-471-5746
brianmcarr@austin.utexas.edu

Re: Modules navigation area empty with generated content when site:site is run on an aggregator POM

Posted by Dennis Lundberg <de...@apache.org>.
The Site Plugin doesn't add links to modules by default. This is
something you have to configure. Add a small site.xml to your aggregator
project like this:

<project>
  <body>
    <menu ref="modules" />
  </body>
</project>

See more about the site descriptor here:
http://maven.apache.org/plugins/maven-site-plugin/examples/sitedescriptor.html

Carr, Brian M wrote:
> I have a simple aggregator pom which defines a number of modules which are
> located in the directory directly beneath them.  The site generated for the
> aggregator seems to know that it should care about it's modules (a modules
> section appears on the generated target/site/index.html, but it has no items
> listed).  The "child" sites has no modules menu item at all (as expected).
> I have no site.xml, so I am looking for default behavior here for now.
> Below is a minimal example which shows the behavior.
> 
> Versions:
> Java version: 1.5.0_16
> OS name: "mac os x" version: "10.5.6" arch: "i386" Family: "unix"
> 
> Tested with both:
> Maven 2.0.9 with maven-site-plugin 2.0-beta-6
> Maven 2.0.10 with maven-site-plugin 2.0-beta-7
> 
> directory layout:
> 
> site-test
> |-pom.xml
> |-site-two
> |-\-pom.xml
> |-site-three
> |-\-pom.xml
> 
> site-test/pom.xml:
> <project>
>   <modelVersion>4.0.0</modelVersion>
>   <groupId>com.example</groupId>
>   <artifactId>site-test</artifactId>
>   <name>Top Level Site Test</name>
>   <version>1.0-SNAPSHOT</version>
>   <packaging>pom</packaging>
> 
>   <modules>
>     <module>site-two</module>
>     <module>site-three</module>
>   </modules>
> </project>
> 
> site-two/pom.xml:
> <project>
>   <modelVersion>4.0.0</modelVersion>
>   <groupId>com.example</groupId>
>   <artifactId>site-two</artifactId>
>   <name>Second Level Site Test</name>
>   <version>1.0-SNAPSHOT</version>
>   <packaging>jar</packaging>
> </project>
> 
> 
> Am I missing a critical configuration stanza here?  I can't find anything in
> the plugin docs or FAQs which suggest that I need anything if I'm not trying
> to customize the output.
> 
> --b
> ______________________________
> Brian M. Carr
> Identity and Access Management
> ITS Applications
> University of Texas at Austin
> V: 512-232-6419
> F: 512-471-5746
> brianmcarr@austin.utexas.edu


-- 
Dennis Lundberg

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