You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Thomas Schmidt (JIRA)" <ji...@codehaus.org> on 2008/06/02 14:20:54 UTC

[jira] Issue Comment Edited: (MSITE-307) Site generation broken with multi-module property inheritence

    [ http://jira.codehaus.org/browse/MSITE-307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=137037#action_137037 ] 

mithrandir edited comment on MSITE-307 at 6/2/08 7:19 AM:
--------------------------------------------------------------

I have the exact same problem.
I think it is even worse. I get a BUILD ERROR when running the site phase.

Excerpt from my Maven run - executed from the main directory of my multimodule project:
======================================================================
[INFO] [site:site]
[INFO] Not executing cobertura:report as the cobertura data file (D:\schmidt\eclipse\mdb\build-tools\target\cobertura\cobertura.ser) could not be found
Downloading: http://myserver/repos/com/my-app/mdb/mdb/${com.my-app.mdb.version}/mdb-${com.my-app.mdb.version}.pom
Downloading: http://people.apache.org/repo/m2-snapshot-repository/com/my-app/mdb/mdb/${com.my-app.mdb.version}/mdb-${com.my-app.mdb.version}.pom
Downloading: http://people.apache.org/repo/m2-incubating-repository/com/my-app/mdb/mdb/${com.my-app.mdb.version}/mdb-${com.my-app.mdb.version}.pom
Downloading: http://download.java.net/maven/1/com.my-app.mdb/poms/mdb-${com.my-app.mdb.version}.pom
Downloading: http://repo1.maven.org/maven2/com/my-app/mdb/mdb/${com.my-app.mdb.version}/mdb-${com.my-app.mdb.version}.pom
[INFO] Parent project loaded from repository.
Downloading: http://myserver/repos/com/my-app/mdb/mdb/${com.my-app.mdb.version}/mdb-${com.my-app.mdb.version}-site_en.xml
Downloading: http://people.apache.org/repo/m2-snapshot-repository/com/my-app/mdb/mdb/${com.my-app.mdb.version}/mdb-${com.my-app.mdb.version}-site_en.xml
Downloading: http://people.apache.org/repo/m2-incubating-repository/com/my-app/mdb/mdb/${com.my-app.mdb.version}/mdb-${com.my-app.mdb.version}-site_en.xml
Downloading: http://download.java.net/maven/1/com.my-app.mdb/xmls/mdb-${com.my-app.mdb.version}-site_en.xml
Downloading: http://repo1.maven.org/maven2/com/my-app/mdb/mdb/${com.my-app.mdb.version}/mdb-${com.my-app.mdb.version}-site_en.xml
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The site descriptor cannot be resolved from the repository: The system can not find the specified path

[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12 seconds
[INFO] Finished at: Mon Jun 02 14:06:53 CEST 2008
[INFO] Final Memory: 36M/254M
[INFO] ------------------------------------------------------------------------
======================================================================

The Properties like ${com.my-app.mdb.version} are specified in my root POM and only used there and in the POMs of the modules. In all other phases and goals they can be resolved from anywhere in the project.
It seems that the site plugin does not resolve those properties at all.

This is really urgent to me as I can not build any reports without hard coding the version numbers in my various modules!
If there is anything I can do to help, please tell me!

Thx!


      was (Author: mithrandir):
    I have the exact same Problem.
I think it is even worse. I get a BUILD ERROR when running the site phase.

Excerpt from my Maven run - executed from the main directory of my multimodule project:
======================================================================
[INFO] [site:site]
[INFO] Not executing cobertura:report as the cobertura data file (D:\schmidt\eclipse\mdb\build-tools\target\cobertura\cobertura.ser) could not be found
Downloading: http://myserver/repos/com/my-app/mdb/mdb/${com.my-app.mdb.version}/mdb-${com.my-app.mdb.version}.pom
Downloading: http://people.apache.org/repo/m2-snapshot-repository/com/my-app/mdb/mdb/${com.my-app.mdb.version}/mdb-${com.my-app.mdb.version}.pom
Downloading: http://people.apache.org/repo/m2-incubating-repository/com/my-app/mdb/mdb/${com.my-app.mdb.version}/mdb-${com.my-app.mdb.version}.pom
Downloading: http://download.java.net/maven/1/com.my-app.mdb/poms/mdb-${com.my-app.mdb.version}.pom
Downloading: http://repo1.maven.org/maven2/com/my-app/mdb/mdb/${com.my-app.mdb.version}/mdb-${com.my-app.mdb.version}.pom
[INFO] Parent project loaded from repository.
Downloading: http://myserver/repos/com/my-app/mdb/mdb/${com.my-app.mdb.version}/mdb-${com.my-app.mdb.version}-site_en.xml
Downloading: http://people.apache.org/repo/m2-snapshot-repository/com/my-app/mdb/mdb/${com.my-app.mdb.version}/mdb-${com.my-app.mdb.version}-site_en.xml
Downloading: http://people.apache.org/repo/m2-incubating-repository/com/my-app/mdb/mdb/${com.my-app.mdb.version}/mdb-${com.my-app.mdb.version}-site_en.xml
Downloading: http://download.java.net/maven/1/com.my-app.mdb/xmls/mdb-${com.my-app.mdb.version}-site_en.xml
Downloading: http://repo1.maven.org/maven2/com/my-app/mdb/mdb/${com.my-app.mdb.version}/mdb-${com.my-app.mdb.version}-site_en.xml
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The site descriptor cannot be resolved from the repository: The system can not find the specified path

[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12 seconds
[INFO] Finished at: Mon Jun 02 14:06:53 CEST 2008
[INFO] Final Memory: 36M/254M
[INFO] ------------------------------------------------------------------------
======================================================================

The Properties like ${com.my-app.mdb.version} are specified in my root POM and only used there and in the POMs of the modules. In all other phases and goals they can be resolved from anywhere in the project.
It seems that the site plugin does not resolve those properties at all.

This is really urgent to me as I can not build any reports without hard coding the version numbers in my various modules!
If there is anything I can do to help, please tell me!

Thx!

  
> Site generation broken with multi-module property inheritence
> -------------------------------------------------------------
>
>                 Key: MSITE-307
>                 URL: http://jira.codehaus.org/browse/MSITE-307
>             Project: Maven 2.x Site Plugin
>          Issue Type: Bug
>          Components: inheritance
>    Affects Versions: 2.0-beta-6
>         Environment: Ubuntu 7.10, Maven 2.0.8
>            Reporter: Eric Ryan
>
> Maven2 site plugin inheritence
> I have a multi-module project with the following directory structure:
> my-app
> |
> |---my-client-ui
> |   |
> |   |---pom.xml
> |
> |---my-core
> |   |
> |   |---pom.xml
> |
> |---my-common
> |   |
> |   |---pom.xml
> |
> |---pom.xml
> I define properties such as ${myVersion}, ${myArtifactId}, ${myGroupId} in the parent pom.  These properties are used by the child poms to resolve the parent pom (they are used in the <parent> tags).  These properties are inherited by the children (as expected) when running goals such as clean, package, or install.    
> I start to see problems when I try to use the site plugin.  I first run the install goal to install my project's jars and poms into my local repo(~/.m2/repository/).  I then verify that the jars and poms are in my local repo.  When I try to run the site plugin it seems as though maven is unable to interpret the properties defined in the parent pom.  I receive the following output for each module:
> [INFO] ------------------------------------------------------------------------
> [INFO] Building my-client-ui
> [INFO]    task-segment: [site]
> [INFO] ------------------------------------------------------------------------
> [INFO] [site:site]
> Downloading: http://repo1.maven.org/maven2/${myGroupId}/${myArtifactId}/${myVersion}/${myArtifactId}-${myVersion}.pom
> [WARNING] Unable to load parent project from repository: Failed to validate POM for project ${myGroupId}:${myArtifactId} at Artifact [${myGroupId}:${myArtifactId}:pom:${myVersion}]
> [INFO] Generating "Continuous Integration" report.......
> I've tried using site:deploy, site:run, and site:stage.  In all cases I recieve a sucessful build, but all sites generated contain broken links. (Note. parent pom's distributionManagement site url=file:///home/eric/tmp) 
> When using site:deploy, there are two issues with the site.  The first is that none of the modules are listed for the project on the left hand side of the screen.  The second is that when I go to the Dependence Convergence section, the links to my project's modules are broken.  In example, the link to my-client-ui incorrectly points to http://www.mycompany.com/my-client-ui when it is in fact located at file:///home/eric/tmp/my-client-ui  (Note.  http://www.mycompany.com is defined in the parent pom as the project's url).  
> site:run demonstrates the same problems as site:deploy. 
> When using site:stage -DstagingDirectory=/home/eric/tmp, there are again two issues w/ the site.  The first is the same, none of the modules are listed on the left hand side of the screen.  The second is also the same, except that the links in the Dependency Convergence section now point to file:///home/eric/localhost/home/eric/tmp/my-client-ui.  This is incorrect because the files are actually located at file:///home/eric/tmp/localhost/home/eric/tmp/my-client-ui.  It is missing the tmp directory in the url string.  
> The only way I've been able to get the modules to be displayed on the left hand side of the screen is using mvn -N site site:deploy.  In this case, the links point to the "correct" place (file:///home/eric/tmp/my-client-ui), but the submodule's sites are never build because of the -N (non-recursive) flag.  Another thing to note is that the Dependency Convergence section is totally missing from this site.
> The only way I've been able to build a site with links that resolve properly is if I remove all instances of properties in all of my poms and replace them with hard coded values.  In this case, the links for the modules do appear on the left hand side of the screen.  The downfall to this approach is that the links in the Dependency Convergence section now point to http://www.mycompany.com/my-client-ui.
> From my discussion with others on the Maven mailing list, it seems as though some other users are experiencing this same issue with site property inheritence.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira