[ https://jira.codehaus.org/browse/MNG-3244?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=281645#comment-281645 ]
Falko Modler edited comment on MNG-3244 at 10/19/11 9:46 AM: ------------------------------------------------------------- It's sad to see that this issue hasn't been fixed in all these years. People *really* need it. I ended up specifying following snippet in each and every child pom: {code:xml} <distributionManagement> <!-- repositories inherited--> <site> <id>${distributionManagement.site.id}</id> <url>${distributionManagement.site.url}</url> </site> </distributionManagement> {code} Whereas the same snippet is defined in the parent pom (including repositories of course!) and this parent pom also defines the referenced properties: {code:xml} <distributionManagement.site.id>someid</distributionManagement.site.id> <distributionManagement.site.url>scp://somehost.example.org/u/admin/maven/site/${project.artifactId}</distributionManagement.site.url> {code} I needed to do the same for project.url and all the URLs in project.scm. It's a quite cumbersome workaround but this way I can use a "dumb" copy and paste approach when creating new child poms - without needing to remember to append the artifactIds! At the the same time I can just release the parent pom as usual, including correct site deployment. was (Author: famod): It's sad to see that this issue hasn't been fixed in all these years. People *really* need it. I ended up specifying following snippet in each and every child pom: {code:xml} <distributionManagement> <!-- repositories inherited--> <site> <id>${distributionManagement.site.id}</id> <url>${distributionManagement.site.url}</url> </site> </distributionManagement> {code} Whereas the same snippet is defined in the parent pom (including repositories of course!) and this parent pom also defines the referenced properties: {code:xml} <distributionManagement.site.id>someid</distributionManagement.site.id> <distributionManagement.site.url>scp://somehos.example.org/u/admin/maven/site/${project.artifactId}</distributionManagement.site.url> {code} I needed to do the same for project.url and all the URLs in project.scm. It's a quite cumbersome workaround but this way I can use a "dumb" copy and paste approach when creating new child poms - without needing to remember to append the artifactIds! At the the same time I can just release the parent pom as usual, including correct site deployment. > inherited site url not properly handling parameters > --------------------------------------------------- > > Key: MNG-3244 > URL: https://jira.codehaus.org/browse/MNG-3244 > Project: Maven 2 & 3 > Issue Type: Bug > Components: Inheritance and Interpolation, Sites & Reporting > Affects Versions: 2.0.7 > Reporter: Jacob Robertson > Assignee: Brian Fox > Fix For: Issues to be reviewed for 3.x > > Attachments: fix-inherited-site-url.patch, guide-site.patch, > mng-3244_patch.txt > > > Here is the test case to reproduce this problem. Take the following two > pom.xml files > {code:xml}<?xml version="1.0" encoding="UTF-8"?> > <project> > <groupId>org.bar</groupId> > <artifactId>foo</artifactId> > <name>foo</name> > <version>1.0-SNAPSHOT</version> > <packaging>pom</packaging> > <modelVersion>4.0.0</modelVersion> > <distributionManagement> > <site> > <id>foo-site</id> > <url>file://C:/Documents and > Settings/foo/.m2/site/${project.artifactId}</url> > </site> > </distributionManagement> > </project>{code} > {code:xml}<?xml version="1.0" encoding="UTF-8"?> > <project> > <groupId>org.bar</groupId> > <artifactId>baz</artifactId> > <name>baz</name> > <version>1.0-SNAPSHOT</version> > <packaging>pom</packaging> > <modelVersion>4.0.0</modelVersion> > <parent> > <artifactId>foo</artifactId> > <groupId>org.bar</groupId> > <version>1.0-SNAPSHOT</version> > </parent> > </project>{code} > And run the site-deploy goal on each. What you get under the site directory > is this > {noformat}- site > /- foo > ---/site docs > /- baz > ---/- baz (extra directory) > --- ---/site docs{noformat} > This is the simplest test case. In the case where I have a "grandparent" > pom, the site directory uses the grandparent/parent as the path to the site, > and doesn't use the actual artifactId of the artifact I'm creating the site > for. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira