mirror of https://github.com/apache/maven.git
Remove model cloning.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@700325 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3af42c2f05
commit
9220e682ec
|
@ -515,7 +515,7 @@ public class DefaultPluginManager
|
|||
getLogger().warn( "Mojo: " + mojoDescriptor.getGoal() + " is deprecated.\n" + mojoDescriptor.getDeprecated() );
|
||||
}
|
||||
|
||||
Model model = ModelUtils.cloneModel( project.getModel() );
|
||||
Model model = project.getModel();
|
||||
pathTranslator.alignToBaseDirectory( model, project.getBasedir() );
|
||||
project.setBuild( model.getBuild() );
|
||||
|
||||
|
|
|
@ -196,7 +196,7 @@ public class DefaultMavenProjectBuilder
|
|||
|
||||
superModel.setVersion( STANDALONE_SUPERPOM_VERSION );
|
||||
|
||||
superModel = ModelUtils.cloneModel( superModel );
|
||||
superModel = superModel;
|
||||
|
||||
ProfileManager profileManager = config.getGlobalProfileManager();
|
||||
|
||||
|
|
|
@ -203,7 +203,7 @@ public class MavenProject
|
|||
this.artifactFactory = artifactFactory;
|
||||
this.mavenProjectBuilder = mavenProjectBuilder;
|
||||
this.projectBuilderConfiguration = projectBuilderConfiguration;
|
||||
originalModel = ModelUtils.cloneModel( model );
|
||||
originalModel = model;
|
||||
DistributionManagement dm = model.getDistributionManagement();
|
||||
|
||||
if ( dm != null )
|
||||
|
@ -1980,11 +1980,11 @@ public class MavenProject
|
|||
setScriptSourceRoots( ( new ArrayList( project.getScriptSourceRoots() ) ) );
|
||||
}
|
||||
|
||||
setModel( ( ModelUtils.cloneModel( project.getModel() ) ) );
|
||||
setModel( project.getModel() );
|
||||
|
||||
if ( project.getOriginalModel() != null )
|
||||
{
|
||||
setOriginalModel( ( ModelUtils.cloneModel( project.getOriginalModel() ) ) );
|
||||
setOriginalModel( project.getOriginalModel() );
|
||||
}
|
||||
|
||||
setExecutionRoot( project.isExecutionRoot() );
|
||||
|
|
|
@ -20,10 +20,8 @@ package org.apache.maven.project;
|
|||
*/
|
||||
|
||||
import org.apache.maven.model.*;
|
||||
import org.apache.maven.project.builder.PomClassicDomainModel;
|
||||
import org.codehaus.plexus.util.xml.Xpp3Dom;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
|
||||
public final class ModelUtils
|
||||
|
@ -312,16 +310,6 @@ public final class ModelUtils
|
|||
child.setConfiguration( childConfiguration );
|
||||
}
|
||||
|
||||
public static Model cloneModel( Model model )
|
||||
{
|
||||
try {
|
||||
return new PomClassicDomainModel(model).getModel();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return model;
|
||||
}
|
||||
}
|
||||
|
||||
public static List mergeRepositoryLists( List dominant, List recessive )
|
||||
{
|
||||
List repositories = new ArrayList();
|
||||
|
|
Loading…
Reference in New Issue