You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by sylsau <sy...@gmail.com> on 2008/04/12 14:14:25 UTC

[M2] Site Generation

Hello,

I am testing maven 2 and I saw that is was a possibility to generate a site
who lists the project's documentation.

My project has the following form :

- pom.xml (super POM)
- moduleA/  with a pom.xml
- moduleB/ with a pom.xml

The content of my the super POM is the following : 

[CODE]
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>fr.projet</groupId>
  <artifactId>projet</artifactId>
  <packaging>pom</packaging>
  <version>0.1</version>
  <name>Projet !</name>

  <modules>
	<module>moduleA</module>
	<module>moduleB</module>
  </modules>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  
<reporting>
  <plugins>
  
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-javadoc-plugin</artifactId>
      
      <configuration>
        <minmemory>128m</minmemory>
        <maxmemory>512m</maxmemory>
      </configuration>
    </plugin>
    
              <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-jxr-plugin</artifactId>
              </plugin>
	      
	  <plugin>
        <artifactId>maven-clover-plugin</artifactId>
      </plugin>
    
  </plugins>
</reporting>
  
  
</project>
[/CODE]

The pom's of the modules are almost the same and are like that : 

[CODE]
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <artifactId>moduleA</artifactId>
  <packaging>jar</packaging>
  <name>Module A</name>
  
    <parent>
    <groupId>fr.projet</groupId>
    <artifactId>projet</artifactId>
    <version>0.1</version>
    <relativePath>../pom.xml</relativePath>
  </parent>
  

</project>

[/CODE]

When i use mvn site command, the site is well generated. The target
directory is created in the same directory that the super POM, but there is
also a directory target that is created in the modules' directories.

When i display the site, in the modules part on the left menu, the list with
my 2 modules is well displayed. However, there is a problem with the links
of theses modules. The links don't redirect correctly to the modules'
target. 

Their form is like that : ... maven/target/site/moduleB/index.html  whereas
the real path of this is the following :
maven/moduleB/target/site/index.html .

Do you know how I can do to generate the modules' target in the target of
the super POM ? or in the other case how I can change the links ?

Thanks for your help.

Sylvain.
-- 
View this message in context: http://www.nabble.com/-M2--Site-Generation-tp16648682s177p16648682.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: [M2] Site Generation

Posted by Hilco Wijbenga <hi...@gmail.com>.
On Sat, Apr 12, 2008 at 6:53 PM, Martin Gainty <mg...@hotmail.com> wrote:
> depends on access capability to the urls especially the required plugins
>  an example would be

I don't see how this has anything to do with access. The generated
URLs are just plain wrong, AFAICT.

The only solution that I have been able to come up with is to run an
Ant script (using maven-antrun-plugin) that generates some symbolic
links so that the generated URLs work. It's ugly but at least the site
works.

I'd love to see a better solution especially since this was apparently
fixed in maven-site-plugin-2.0-beta-5 (MSITE-44). According to
MSITE-275, it was broken again in maven-site-plugin-2.0-beta-6. That
seems to imply somebody got it working in 2.0-beta-5. :-)

http://jira.codehaus.org/browse/MSITE-44
http://jira.codehaus.org/browse/MSITE-275

Cheers,
Hilco

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


Re: [M2] Site Generation

Posted by Martin Gainty <mg...@hotmail.com>.
depends on access capability to the urls especially the required plugins
an example would be

 <distributionManagement>
  <repository>
   <id>apache-repo</id>
   <name>Maven Central Repository</name>

<url>scpexe://people.apache.org//www/people.apache.org/repo/m2-ibiblio-rsync
-repository</url>
  </repository>
  <snapshotRepository>
   <id>apache-snapshots</id>
   <name>Apache Development Repository</name>

<url>scpexe://people.apache.org//www/people.apache.org/repo/m2-snapshot-repo
sitory</url>
  </snapshotRepository>
 </distributionManagement>

If  you cant reach the urls using the indicated protocol scp/sftp/whatever
protocol maybe the site is down?
you can *try* pulling all your plugins locally to a localRepository but that
will take a while

Here is an <localRepository> example from settings.xml
  <localRepository>F:/maven-plugin</localRepository>

HTH
M-
----- Original Message -----
From: "sylsau" <sy...@gmail.com>
To: <us...@maven.apache.org>
Sent: Saturday, April 12, 2008 4:24 PM
Subject: Re: [M2] Site Generation


>
> First, I use the command mvn site then I run the command mvn site:stage.
>
> The result is the same, the links are not good. So, perhars there are
values
> to put in the tag url on the pom ?
> --
> View this message in context:
http://www.nabble.com/-M2--Site-Generation-tp16648682s177p16656455.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


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


Re: [M2] Site Generation

Posted by sylsau <sy...@gmail.com>.
First, I use the command mvn site then I run the command mvn site:stage.

The result is the same, the links are not good. So, perhars there are values
to put in the tag url on the pom ?
-- 
View this message in context: http://www.nabble.com/-M2--Site-Generation-tp16648682s177p16656455.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: [M2] Site Generation

Posted by Siarhei Dudzin <si...@gmail.com>.
You need to deploy or stage the site to have links between modules working

Siarhei

On Sat, Apr 12, 2008 at 2:14 PM, sylsau <sy...@gmail.com> wrote:

>
> Hello,
>
> I am testing maven 2 and I saw that is was a possibility to generate a
> site
> who lists the project's documentation.
>
> My project has the following form :
>
> - pom.xml (super POM)
> - moduleA/  with a pom.xml
> - moduleB/ with a pom.xml
>
> The content of my the super POM is the following :
>
> [CODE]
> <project xmlns="http://maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd">
>  <modelVersion>4.0.0</modelVersion>
>  <groupId>fr.projet</groupId>
>  <artifactId>projet</artifactId>
>  <packaging>pom</packaging>
>  <version>0.1</version>
>  <name>Projet !</name>
>
>  <modules>
>        <module>moduleA</module>
>        <module>moduleB</module>
>  </modules>
>
>  <dependencies>
>    <dependency>
>      <groupId>junit</groupId>
>      <artifactId>junit</artifactId>
>      <version>3.8.1</version>
>      <scope>test</scope>
>    </dependency>
>  </dependencies>
>
> <reporting>
>  <plugins>
>
>    <plugin>
>      <groupId>org.apache.maven.plugins</groupId>
>      <artifactId>maven-javadoc-plugin</artifactId>
>
>      <configuration>
>        <minmemory>128m</minmemory>
>        <maxmemory>512m</maxmemory>
>      </configuration>
>    </plugin>
>
>              <plugin>
>                  <groupId>org.apache.maven.plugins</groupId>
>                  <artifactId>maven-jxr-plugin</artifactId>
>              </plugin>
>
>          <plugin>
>        <artifactId>maven-clover-plugin</artifactId>
>      </plugin>
>
>  </plugins>
> </reporting>
>
>
> </project>
> [/CODE]
>
> The pom's of the modules are almost the same and are like that :
>
> [CODE]
> <project xmlns="http://maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd">
>  <modelVersion>4.0.0</modelVersion>
>  <artifactId>moduleA</artifactId>
>  <packaging>jar</packaging>
>  <name>Module A</name>
>
>    <parent>
>    <groupId>fr.projet</groupId>
>    <artifactId>projet</artifactId>
>    <version>0.1</version>
>    <relativePath>../pom.xml</relativePath>
>  </parent>
>
>
> </project>
>
> [/CODE]
>
> When i use mvn site command, the site is well generated. The target
> directory is created in the same directory that the super POM, but there
> is
> also a directory target that is created in the modules' directories.
>
> When i display the site, in the modules part on the left menu, the list
> with
> my 2 modules is well displayed. However, there is a problem with the links
> of theses modules. The links don't redirect correctly to the modules'
> target.
>
> Their form is like that : ... maven/target/site/moduleB/index.html
>  whereas
> the real path of this is the following :
> maven/moduleB/target/site/index.html .
>
> Do you know how I can do to generate the modules' target in the target of
> the super POM ? or in the other case how I can change the links ?
>
> Thanks for your help.
>
> Sylvain.
> --
> View this message in context:
> http://www.nabble.com/-M2--Site-Generation-tp16648682s177p16648682.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>