maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nate Good (JIRA)" <>
Subject [jira] Commented: (MNG-1943) MavenProject::getParent() returns a MavenProject that is NOT interpolated
Date Fri, 16 May 2008 20:26:27 GMT


Nate Good commented on MNG-1943:

I have just experienced this issue in a more critical use case.  Here are the details.  Please
let me know if you need more information.

${buildVersion} is a property defined in a profile in settings.xml and is used in all poms.


It seems that the problem presents itself when a project depends on an artifact that has a
parent with a non-literal value; and the parent pom is not located on the filesystem.


pom.xml - This is the master pom that all others inherit from
Project A
&nbsp;&nbsp;pom.xml - Inherits from master pom
&nbsp;&nbsp;&nbsp;&nbsp;pom.xml - inherits from ProjectA/pom.xml

Project B
&nbsp;&nbsp;pom.xml - depends on A.x

if you run maven on ProjectB and A.x is located in a remote repository it will fail because
${buildVersion} in A.x/pom.xml will not be interpolated before it is used to lookup the pom.
Here is the resulting stack trace (from version 2.0.9):

Caused by: org.apache.maven.project.ProjectBuildingException: 
Cannot find parent: for project:${buildVersion}
for project${buildVersion}
        at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(
        at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(
        at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(
        at org.apache.maven.project.artifact.MavenMetadataSource.retrieve(

Is this scheduled to be fixed in the next maven release?

> MavenProject::getParent() returns a MavenProject that is NOT interpolated
> -------------------------------------------------------------------------
>                 Key: MNG-1943
>                 URL:
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Inheritance and Interpolation
>            Reporter: John Allen
>            Priority: Blocker
>             Fix For: 2.1
>         Attachments:
> Plugin developers repeatedly use ${project}.getParent().someMethod() yet getParent()
returns a project that has not been interpolated. This obviously needs to be fixed but may
I also suggest that all plugin acceptance testing is revisted to ensure that the tests use
POMs that are littered with property expressions and not literals.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message