Avatar billede fredand Forsker
12. august 2009 - 16:33 Der er 1 løsning

Links points wrong with "mvn site"

Hello!

Trying to create report-site with maven.
But some links does not work so well.

We got a pretty large project like:
a
-b
--c
--d
--e

In b we got the modules:
  <modules>
      <module>e</module>
      <module>d</module>
      <module>c</module>
  </modules>

But when we generate the site with "mvn site", everything seem to be put at correct location.

like in a:
target/site:
a
-b
--c
--d
--e

But in index.html at b we got these urls to c,d and e:
  <li class="none">
                    <a href="e/index.html">e</a>
          </li>
             
    <li class="none">
                    <a href="d/index.html">d</a>
          </li>
             
    <li class="none">
                    <a href="../index.html">c</a>
          </li>


As you can see the link to c points to wrong location, but the other e and d works fine.

We use this plugin in each pom, but with different outputDirectory:
      <reporting>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-report-plugin</artifactId>
          <version>2.4.2</version>
          <configuration>
              <outputDirectory>../../target/site/b/e</outputDirectory>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>2.0-beta-5</version>
          <configuration>
              <outputDirectory>../../target/site/b/e</outputDirectory>
          </configuration>
        </plugin>
      </plugins>
  </reporting>

The same for c "../../target/site/b/c"


So if you guys got any idea why c points wrong please let me know!

Best regards
Fredrik
Avatar billede fredand Forsker
13. august 2009 - 10:13 #1
Hello!

I found that several people had the same problem.
Perhaps there is a bug, but there is something mentioned about this at:
http://maven.apache.org/plugins/maven-site-plugin/faq.html#Why_dont_the_links_between_parent_and_child_modules_work_when_I_run_mvn_site

But I never got that to work either (mvn site:stage).

I think we close this one then!

Best regards
Fredrik
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Kurser inden for grundlæggende programmering

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester