[
http://jira.codehaus.org/browse/MNG-3244?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_124745
]
Jens Riboe commented on MNG-3244:
---------------------------------
[I sent this comment to the list, without any repsonse, so I decided to put
them here - where they belong]
As I understand it; the current rule implements implicit URLs as
${parent.url}/${project.artifactId}
For example:
<scm>
<connection>${parentPOM.scm.connection}/${project.artifactId}</connection>
...
/scm>
Where parentPOM is a made-up symbol denoting an upward search for the pom
property that follows (scm.connection).
So, how about the following suggestion:
The Super POM contains this kind of definition for all URLs where this rule
applies today. When the effective POM
is computed for a sub-project it uses the "closest" url definition that
contains the symbol parentPOM. If none is
found expect the def in super pom, this one is used and the rule applies as it
always has.
On the other hand, if one decides to put an url expression containing parentPOM
into a POM of type 'pom',
then there is a new definition and will be used. That means, we have a way to
define how sub-project urls should
be constructed. I would be delighted if I could define an expression like
${parentPOM.scm.connection}/${project.name}/trunk
There is a residual problem, however: I cannot define both an url expansion
expression and an actual url expression
that is intended to be used in sub-projects. The easiest solution, is just to
have two organization poms, the top-most
pom contains the url expansion expressions (overriding the rule from the super
pom) and the one beneath is the
original org pom, containing actual urls that will be used in the expansions
further down.
I'm convinced there are other more elegant solutions. However, the suggestion
above would be fairly easy to implement
without breaking existing code and poms (or require a POM version increment),
but still provide a way for org-pom
designers to tweak the url expansions the way they want.
Comments / Objections ???
> inherited site url not properly handling parameters
> ---------------------------------------------------
>
> Key: MNG-3244
> URL: http://jira.codehaus.org/browse/MNG-3244
> Project: Maven 2
> Issue Type: Bug
> Components: Inheritance and Interpolation, Sites & Reporting
> Affects Versions: 2.0.7
> Reporter: Jacob Robertson
> Assignee: Brian Fox
> Fix For: 2.0.9
>
> Attachments: fix-inherited-site-url.patch, guide-site.patch
>
>
> 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