maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgo...@apache.org
Subject svn commit: r579083 - in /maven/components/branches/maven-2.0.x: maven-artifact/src/main/java/org/apache/maven/artifact/ maven-project/src/main/java/org/apache/maven/project/ maven-project/src/test/java/org/apache/maven/project/imports/ maven-project/s...
Date Tue, 25 Sep 2007 06:11:09 GMT
Author: rgoers
Date: Mon Sep 24 23:11:06 2007
New Revision: 579083

URL: http://svn.apache.org/viewvc?rev=579083&view=rev
Log:
Revert 578551

Removed:
    maven/components/branches/maven-2.0.x/maven-project/src/test/java/org/apache/maven/project/imports/
    maven/components/branches/maven-2.0.x/maven-project/src/test/resources/imports-repo/
Modified:
    maven/components/branches/maven-2.0.x/maven-artifact/src/main/java/org/apache/maven/artifact/Artifact.java
    maven/components/branches/maven-2.0.x/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java

Modified: maven/components/branches/maven-2.0.x/maven-artifact/src/main/java/org/apache/maven/artifact/Artifact.java
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-artifact/src/main/java/org/apache/maven/artifact/Artifact.java?rev=579083&r1=579082&r2=579083&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/maven-artifact/src/main/java/org/apache/maven/artifact/Artifact.java
(original)
+++ maven/components/branches/maven-2.0.x/maven-artifact/src/main/java/org/apache/maven/artifact/Artifact.java
Mon Sep 24 23:11:06 2007
@@ -58,8 +58,6 @@
 
     String SCOPE_SYSTEM = "system";
 
-    String SCOPE_IMPORT = "import";   // Used to import dependencyManagement dependencies

-
     String RELEASE_VERSION = "RELEASE";
 
     String getGroupId();

Modified: maven/components/branches/maven-2.0.x/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java?rev=579083&r1=579082&r2=579083&view=diff
==============================================================================
--- maven/components/branches/maven-2.0.x/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
(original)
+++ maven/components/branches/maven-2.0.x/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
Mon Sep 24 23:11:06 2007
@@ -98,7 +98,6 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-import java.util.TreeMap;
 
 /*:apt
 
@@ -798,8 +797,6 @@
             }
         }
 
-        mergeManagedDependencies(project.getModel(), localRepository, parentSearchRepositories);
-
         try
         {
             project = processProjectLogic( pomLocation, project, externalProfileManager,
projectDir, strict );
@@ -1293,66 +1290,6 @@
         rawProjectCache.put( createCacheKey( project.getGroupId(), project.getArtifactId(),
project.getVersion() ), new MavenProject( project ) );
 
         return project;
-    }
-
-    private void mergeManagedDependencies(Model model, ArtifactRepository localRepository,
List parentSearchRepositories)
-        throws ProjectBuildingException
-    {
-        DependencyManagement modelDepMgmt = model.getDependencyManagement();
-
-        if (modelDepMgmt != null)
-        {
-            Map depsMap = new TreeMap();
-            Iterator iter = modelDepMgmt.getDependencies().iterator();
-            boolean doInclude = false;
-            while (iter.hasNext())
-            {
-                Dependency dep = (Dependency) iter.next();
-                depsMap.put( dep.getManagementKey(), dep );
-                if (dep.getType().equals("pom") && Artifact.SCOPE_IMPORT.equals(dep.getScope()))
-                {
-                    doInclude = true;
-                }
-            }
-            Map newDeps = new TreeMap(depsMap);
-            iter = modelDepMgmt.getDependencies().iterator();
-            if (doInclude)
-            {
-                while (iter.hasNext())
-                {
-                    Dependency dep = (Dependency)iter.next();
-                    if (dep.getType().equals("pom") && Artifact.SCOPE_IMPORT.equals(dep.getScope()))
-                    {
-                        Artifact artifact = artifactFactory.createProjectArtifact( dep.getGroupId(),
dep.getArtifactId(),
-                                                                                  dep.getVersion(),
dep.getScope() );
-                        MavenProject project = buildFromRepository(artifact, parentSearchRepositories,
localRepository, false);
-
-                        DependencyManagement depMgmt = project.getDependencyManagement();
-
-                        if (depMgmt != null)
-                        {
-                            if ( getLogger().isDebugEnabled() )
-                            {
-                                getLogger().debug( "Importing managed dependencies for "
+ dep.toString() );
-                            }
-
-                            for ( Iterator it = depMgmt.getDependencies().iterator(); it.hasNext();
)
-                            {
-                                Dependency includedDep = (Dependency) it.next();
-                                String key = includedDep.getManagementKey();
-                                if (!newDeps.containsKey(key))
-                                {
-                                    newDeps.put( includedDep.getManagementKey(), includedDep
);
-                                }
-                            }
-                            newDeps.remove(dep.getManagementKey());
-                        }
-                    }
-                }
-                List deps = new ArrayList(newDeps.values());
-                modelDepMgmt.setDependencies(deps);
-            }
-        }
     }
 
     private List injectActiveProfiles( ProfileManager profileManager,



Mime
View raw message