[ 
http://jira.codehaus.org/browse/MNG-3075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_101659
 ] 

Jay Sachs edited comment on MNG-3075 at 7/8/07 7:09 PM:
--------------------------------------------------------

A few more details I've discovered on this one:

1. The variables don't have to be ${project.*}; any variables used in the urls 
will trigger this.

2. If I have a parent POM with
  ...
  <distributionManagement>
    <site>
      <url>http://${myProjName}</url>
    </site>
  </distributionManagement>
  <properties>
     <myProjName>myParent</myProjName>
  </properties>
and then extend it with a POM like
  ...
    ...
  <artifactId>child</artifactId>
  <properties>
     <myProjName>foo/bar</myProjName>
  </properties>

then the url ends up as

  http://foo/bar/child

So what seems to be happening is that the artifactId is getting appended to the 
child project's URLs, regardless of whether it's specified in the urls of the 
parent POM. In fact, if the URL in the parent POM contains no variable 
reference, the child project artifactId is automatically appended to the URL.


 was:
A few more details I've discovered on this one:

1. The variables don't have to be ${project.*}; any variables used in the urls 
will trigger this.

2. If I have a parent POM with
  ...
  <distributionManagement>
    <site>
      <url>http://${myProjName}</url>
    </site>
  </distributionManagement>
  <properties>
     <myProjName>myParent</myProjName>
  </properties>
and then extend it with a POM like
  ...
    ...
  <artifactId>child</artifactId>
  <properties>
     <myProjName>foo/bar</myProjName>
  </properties>

then the url ends up as

  http://foo/bar/child

So what seems to be happening is that the artifactId is getting appended to the 
child project's URLs, regardless of whether it's specified in the urls of the 
parent POM.


> Project properties, project.artifactId and project.version, are incorrectly 
> translated when use defined in a parent POM.
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MNG-3075
>                 URL: http://jira.codehaus.org/browse/MNG-3075
>             Project: Maven 2
>          Issue Type: Bug
>    Affects Versions: 2.0.6, 2.0.7
>            Reporter: Paul Spencer
>         Attachments: pom.xml, pom.xml, pom.xml
>
>
> I have defined the <scm> and <distributionManagement> tags in a parent POM.  
> The definitions in the parent POM use ${project.artifactId} and 
> ${project.version}.  The problem is the resulting POM has incorrect tags.
> As an example: When the master POM contains the following configuration, the 
> distribution site url for the "bad-effective-pom" project is 
> scp://developer.foo.com/developer-foo-com/projects/bad-effective-pom/1.0-SNAPSHOT/bad-effective-pom
>   <distributionManagement>
>     <site>
>       <id>foo-project-site</id>
>       <name>Project Site</name>
>       
> <url>scp://developer.foo.com/developer-foo-com/projects/${project.artifactId}/${project.version}</url>
>     </site>
>   </distributionManagement>
> As the level of POM inheritance increases, so do the problem.
> A test case will be attached to this issue.

-- 
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

        

Reply via email to