MTranchant
MTranchant

Reputation: 485

Maven site multi module - folder generation issue

I am trying to build a site for a multi-module projects. My workspace is like this :

+- application
|   +-  app1
|   |    +-- pom.xml
|   +-  app2
|        +-- pom.xml
+- interface
|   +-  interf1
|   |    +-- pom.xml
|   +-  interf2
|        +-- pom.xml
+- logic
|   +-  logic1
|   |    +-- pom.xml
|   +-  logic2
|        +-- pom.xml
+-- pom.xml (parent one)

I wanted to build a staged site of this project. It works if I stay at level 0 (root), but I cannot navigate into the child modules because they are not in the correct folder.

What is created in the filesystem:

stage
+- index.html                              <- A
+- dependencies.html 
+- (...)
+-- application
|    +-- app1
|    |     +-- index.html 
|    |     +-- dependencies.html
|    +-- app2
|          +-- index.html 
|          +-- dependencies.html
(and so on...)

What is in the code of "A" :

<a href="app1/index.html" ..>

instead of

<a href="applications/app1/index.html" ..>

I don't want to change my project structure. Is there a way to indicate Maven to preserve the folder structure when creating the staged site ?

I am using Maven 3.0.4 and maven-site-plugin 3.0.

parent pom.xml

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-site-plugin</artifactId>
    <version>3.0</version>
    <configuration>
        <stagingDirectory>/home/me/stage</stagingDirectory>
        <reportPlugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>2.4</version>
            </plugin>
        </reportPlugins>
    </configuration>
</plugin>

Thanks in advance

Upvotes: 1

Views: 382

Answers (1)

user944849
user944849

Reputation: 14951

Try using the most recent version of the site plugin (3.4).

Upvotes: 1

Related Questions