Uploaded image for project: 'Maven Site Plugin'
  1. Maven Site Plugin
  2. MSITE-395

Maven site multi module url problem

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 2.0
    • 2.1
    • multi module
    • None

    Description

      The generated maven (2.0.10) site for a multi module project is different on windows and linux.
      The difference is the relative url for the modules.
      --------------------------------------------------

      Here's the project structure :

      myProject/
      trunk/
      pom.xml
      module1/
      pom.xml
      src/
      module2/
      pom.xml
      src/
      --------------------------------------------------

      Here's myProject/trunk/pom.xml definition :

      <groupId>com.myProject</groupId>
      <artifactId>modulepom</artifactId>
      <packaging>pom</packaging>
      <name>POM myProject</name>
      <version>1.0-SNAPSHOT</version>

      <modules>
      <module>module1</module>
      <module>module2</module>
      </modules>

      <distributionManagement>
      <site>
      <id>site</id>
      <name>Maven site</name>
      <url>file://</url>
      </site>
      </distributionManagement>

      <build>
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-site-plugin</artifactId>
      <version>2.0</version>
      </plugin>
      </build>
      --------------------------------------------------
      On module1 and module2 pom, I didn't declare any <distributionManagement> information.
      I've "only" declared the parent

      <parent>
      <groupId>com.myProject</groupId>
      <artifactId>modulepom</artifactId>
      <version>1.0-SNAPSHOT</version>
      </parent>

      <groupId>com.myProject</groupId>
      <artifactId>module1</artifactId>
      <packaging>jar</packaging>
      <version>1.0-SNAPSHOT</version>
      <name>module1 name</name>
      --------------------------------------------------

      Here are the index.html files generated on windows and linux in myProject/trunk/target/staging/localhost/ after launching mvn site:stage in directory myProject/trunk/

      --> Site deployed on Windows which is correct

      ....
      <h5>Modules</h5><ul>
      <li class="none">
      <a href="module1/index.html">module1 name</a>
      </li>

      <li class="none">
      <a href="module2/index.html">module2 name</a>
      </li>
      ...

      --> Site deployed on Linux which isn't correct

      ...
      <h5>Modules</h5><ul>
      <li class="none">
      <a href="../../tmp/testProject/myProject/trunk/../localhost">module1 name</a>
      </li>

      <li class="none">
      <a href="../../tmp/testProject/myProject/trunk/../localhost">module2 name</a>
      </li>
      ...

      where /tmp/testProject/ is the absolute path where is stored myProject/ on linux
      --------------------------------------------------

      Any idea ?
      Maybe i should use something different in <distributionManagement> than <url>file://</url>
      Thanks for your help

      Attachments

        Issue Links

          Activity

            People

              ltheussl Lukas Theussl
              valsho valsho
              Votes:
              10 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: