You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Farrukh Najmi <fa...@wellfleetsoftware.com> on 2007/10/17 19:31:48 UTC

Multi-module project site has incorrect URLs for sub-module links

I have a multi-module project. The parent root module is called "root" 
while the sub-module is called "sub".

The pom.xml for "root" defines sub-modules as follows (pom composition):

    <modules>
        <module>sub</module>
    </modules>

It is also used as a parent pom by pom.xml for "sub":

    <parent>
        <artifactId>root</artifactId>
        ....
        <relativePath>..</relativePath>
    </parent>

The pom.xml for "root" defines many things that are inherited by 
sub-module poms. In particular it defines reporting with various plugins 
using their default configuration:

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>jdepend-maven-plugin</artifactId>
                <version>2.0-beta-1-SNAPSHOT</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-report-plugin</artifactId>
            </plugin>           
        </plugins>
    </reporting>       

There is currently no site.xml file any where.

When I run site:site at the "root" level I get a web page that looks 
good. It lists the sub-modules in upper left corner. However, the URL 
associated with sub-module "sub" is:

file:///.../root/trunk/target/site/sub/index.html

when it should really be:

file:///.../root/trunk/sub/target/site/index.html

I am guessing that it has to do with the inheritence of the <reporting> 
tag from "root" pom by "sub" pom.
How can I fix it? TIA for your help.

-- 
Regards,
Farrukh

Web: http://www.wellfleetsoftware.com



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


Re: Multi-module project site has incorrect URLs for sub-module links

Posted by Farrukh Najmi <fa...@wellfleetsoftware.com>.
I found the solution in the archives in following thread:

<http://www.nabble.com/forum/ViewPost.jtp?post=5433379&framed=y&skin=177>

The trick was to use site:stage with -DstagingDirectory parameter 
pointing to an absolute directory location.

Thanks.

Farrukh Najmi wrote:
>
> I have a multi-module project. The parent root module is called "root" 
> while the sub-module is called "sub".
>
> The pom.xml for "root" defines sub-modules as follows (pom composition):
>
>    <modules>
>        <module>sub</module>
>    </modules>
>
> It is also used as a parent pom by pom.xml for "sub":
>
>    <parent>
>        <artifactId>root</artifactId>
>        ....
>        <relativePath>..</relativePath>
>    </parent>
>
> The pom.xml for "root" defines many things that are inherited by 
> sub-module poms. In particular it defines reporting with various 
> plugins using their default configuration:
>
>    <reporting>
>        <plugins>
>            <plugin>
>                <groupId>org.apache.maven.plugins</groupId>
>                <artifactId>maven-javadoc-plugin</artifactId>
>            </plugin>
>            <plugin>
>                <groupId>org.codehaus.mojo</groupId>
>                <artifactId>jdepend-maven-plugin</artifactId>
>                <version>2.0-beta-1-SNAPSHOT</version>
>            </plugin>
>            <plugin>
>                <groupId>org.apache.maven.plugins</groupId>
>                <artifactId>maven-surefire-report-plugin</artifactId>
>            </plugin>                  </plugins>
>    </reporting>      
> There is currently no site.xml file any where.
>
> When I run site:site at the "root" level I get a web page that looks 
> good. It lists the sub-modules in upper left corner. However, the URL 
> associated with sub-module "sub" is:
>
> file:///.../root/trunk/target/site/sub/index.html
>
> when it should really be:
>
> file:///.../root/trunk/sub/target/site/index.html
>
> I am guessing that it has to do with the inheritence of the 
> <reporting> tag from "root" pom by "sub" pom.
> How can I fix it? TIA for your help.
>


-- 
Regards,
Farrukh

Web: http://www.wellfleetsoftware.com



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