put a resolved parent artifact in the final mavenproject instance

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@448095 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Milos Kleint 2006-09-20 06:37:40 +00:00
parent 927ee3b3b8
commit 7286e853ae
1 changed files with 6 additions and 3 deletions

View File

@ -891,6 +891,8 @@ public class DefaultMavenProjectBuilder
MavenProject parentProject = project.getParent();
Model originalModel = project.getOriginalModel();
Artifact parentArtifact = project.getParentArtifact();
// We will return a different project object using the new model (hence the need to return a project, not just modify the parameter)
project = new MavenProject( model );
@ -923,9 +925,10 @@ public class DefaultMavenProjectBuilder
if ( parentProject != null )
{
Artifact parentArtifact = artifactFactory.createParentArtifact( parentProject.getGroupId(),
parentProject.getArtifactId(),
parentProject.getVersion() );
// Artifact parentArtifact = artifactFactory.createParentArtifact( parentProject.getGroupId(),
// parentProject.getArtifactId(),
// parentProject.getVersion() );
// the parent artifact from the parameter passed project instance is resolved.
project.setParentArtifact( parentArtifact );
}