[
http://jira.codehaus.org/browse/MNG-3244?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=246713#action_246713
]
Benny Goemans commented on MNG-3244:
------------------------------------
Since I've experiencing issues on this as well, I've been thinking that
referencing i.e. project.version in a parent pom (to the parent's version)
should be possible.
I might not see a certain UC or already implemented behaviour, but wouldn't
this be possible (and still be backwards compatible) by adding one of two
behaviours:
1. A way to specify properties that are resolved to the correct version (from
the pom that they're in) either at install time or at the time the effective
pom is generated. A proposal on this option would be to use i.e. #{property} or
maybe $[property]
I think that this might even be possible in a Maven plugin, but there will be a
problem with backing up the pom first then as well. If there's a way to hook
into the effective pom generation it can be done cleanly though without
touching the pom on disk.
2. A way to specify a certain parent in the hierarchy, though this would
require a model change. It would then be possible to request a certain parent,
i.e. by doing ${project.parent.someParentGroup.someParentId}
Personally I like #1 the most, though #2 is probably the most powerful. Both
will of course require a substantial amount of work, but I expect that #2 will
require a lot more than #1.
ps. just wondering: are votes counted together from all related issues? If so I
might vote on them all ;)
> inherited site url not properly handling parameters
> ---------------------------------------------------
>
> Key: MNG-3244
> URL: http://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 reroduce this problem. Take the following two
> pom.xml files
> <?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>
> <?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>
> And run the site-deploy goal on each. What you get under the site directory
> is this
> - site
> /- foo
> ---/site docs
> /- baz
> ---/- baz (extra directory)
> --- ---/site docs
> 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.
-
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