maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sisb...@apache.org
Subject svn commit: r700325 - in /maven/components/trunk: maven-core/src/main/java/org/apache/maven/plugin/ maven-project/src/main/java/org/apache/maven/project/
Date Tue, 30 Sep 2008 01:58:20 GMT
Author: sisbell
Date: Mon Sep 29 18:58:20 2008
New Revision: 700325

URL: http://svn.apache.org/viewvc?rev=700325&view=rev
Log:
Remove model cloning.

Modified:
    maven/components/trunk/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java
    maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
    maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/MavenProject.java
    maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/ModelUtils.java

Modified: maven/components/trunk/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java?rev=700325&r1=700324&r2=700325&view=diff
==============================================================================
--- maven/components/trunk/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java
(original)
+++ maven/components/trunk/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java
Mon Sep 29 18:58:20 2008
@@ -515,7 +515,7 @@
             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() );
 

Modified: maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java?rev=700325&r1=700324&r2=700325&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
(original)
+++ maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
Mon Sep 29 18:58:20 2008
@@ -196,7 +196,7 @@
 
         superModel.setVersion( STANDALONE_SUPERPOM_VERSION );
 
-        superModel = ModelUtils.cloneModel( superModel );
+        superModel = superModel;
 
         ProfileManager profileManager = config.getGlobalProfileManager();
 

Modified: maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/MavenProject.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/MavenProject.java?rev=700325&r1=700324&r2=700325&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/MavenProject.java
(original)
+++ maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/MavenProject.java
Mon Sep 29 18:58:20 2008
@@ -203,7 +203,7 @@
         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 @@
             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() );

Modified: maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/ModelUtils.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/ModelUtils.java?rev=700325&r1=700324&r2=700325&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/ModelUtils.java
(original)
+++ maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/ModelUtils.java
Mon Sep 29 18:58:20 2008
@@ -20,10 +20,8 @@
  */
 
 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 @@
         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();



Mime
View raw message