[ http://jira.codehaus.org/browse/MSITE-307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=171671#action_171671 ]
Aleksander Adamowski commented on MSITE-307: -------------------------------------------- Hamid, did you open a new JIRA issue on problem 1) ? What's its number? > 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 > Attachments: module_project.zip, mvn_output.txt > > > 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