Correcting problem with originalModel being reset inside processProjectLogic(..) in DefaultMavenProjectBuilder

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@231121 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
John Dennis Casey 2005-08-09 21:44:54 +00:00
parent 9b92bf860e
commit acf7e6f1f8
1 changed files with 10 additions and 0 deletions

View File

@ -495,12 +495,22 @@ public class DefaultMavenProjectBuilder
MavenProject parentProject = project.getParent(); MavenProject parentProject = project.getParent();
Model originalModel = project.getOriginalModel();
//=======================================================================
//
// WATCH OUT FOR THIS LINE! in-project is NOT the same as out-project!!!
//
//=======================================================================
project = new MavenProject( model ); project = new MavenProject( model );
project.addProfileProperties( profileProperties ); project.addProfileProperties( profileProperties );
project.setActiveProfiles( activeProfiles ); project.setActiveProfiles( activeProfiles );
project.setOriginalModel( originalModel );
// TODO: maybe not strictly correct, while we should enfore that packaging has a type handler of the same id, we don't // TODO: maybe not strictly correct, while we should enfore that packaging has a type handler of the same id, we don't
Artifact projectArtifact = artifactFactory.createBuildArtifact( project.getGroupId(), project.getArtifactId(), Artifact projectArtifact = artifactFactory.createBuildArtifact( project.getGroupId(), project.getArtifactId(),
project.getVersion(), project.getPackaging() ); project.getVersion(), project.getPackaging() );