maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ogusa...@apache.org
Subject svn commit: r771407 - /maven/mercury/trunk/mercury-core/src/main/java/org/apache/maven/mercury/metadata/DependencyTreeBuilder.java
Date Mon, 04 May 2009 19:12:45 GMT
Author: ogusakov
Date: Mon May  4 19:12:45 2009
New Revision: 771407

URL: http://svn.apache.org/viewvc?rev=771407&view=rev
Log:
[MERCURY-120] - eliminated mutiple tree creation. resolveConflicts() now builds a single dependency
tree when supplied a list of artifact metadada to resolve together.

Modified:
    maven/mercury/trunk/mercury-core/src/main/java/org/apache/maven/mercury/metadata/DependencyTreeBuilder.java

Modified: maven/mercury/trunk/mercury-core/src/main/java/org/apache/maven/mercury/metadata/DependencyTreeBuilder.java
URL: http://svn.apache.org/viewvc/maven/mercury/trunk/mercury-core/src/main/java/org/apache/maven/mercury/metadata/DependencyTreeBuilder.java?rev=771407&r1=771406&r2=771407&view=diff
==============================================================================
--- maven/mercury/trunk/mercury-core/src/main/java/org/apache/maven/mercury/metadata/DependencyTreeBuilder.java
(original)
+++ maven/mercury/trunk/mercury-core/src/main/java/org/apache/maven/mercury/metadata/DependencyTreeBuilder.java
Mon May  4 19:12:45 2009
@@ -89,8 +89,6 @@
 
     private EventManager _eventManager;
 
-    private boolean _buildIndividualTrees = false;
-
     private boolean _allowCircularDependencies =
         Boolean.parseBoolean( System.getProperty( SYSTEM_PROPERTY_ALLOW_CIRCULAR_DEPENDENCIES,
"false" ) );
 
@@ -281,54 +279,8 @@
         
         nodeCount = filteredMDs.size();
         
-        if ( _buildIndividualTrees )
-        {
-            List<MetadataTreeNode> deps = new ArrayList<MetadataTreeNode>( nodeCount
);
-            
-            for ( ArtifactMetadata bmd : filteredMDs )
-            {
-                // inject global into local
-                if ( ! Util.isEmpty( inclusions ) )
-                {
-                    List<ArtifactMetadata> inc = inclusions.getMetadataList();
-
-                    if ( bmd.hasInclusions() )
-                        bmd.getInclusions().addAll( inc );
-                    else
-                        bmd.setInclusions( inc );
-                }
-
-                // inject global into local
-                if ( ! Util.isEmpty( exclusions ) )
-                {
-                    List<ArtifactMetadata> excl = exclusions.getMetadataList();
-
-                    if ( bmd.hasExclusions() )
-                        bmd.getExclusions().addAll( excl );
-                    else
-                        bmd.setExclusions( excl );
-                }
-
-                MetadataTreeNode rooty = buildTree( bmd, scope );
-
-                deps.add( rooty );
-            }
-
-            if ( Util.isEmpty( deps ) ) // all dependencies are filtered out
-                return null;
-
-            // combine into one tree
-            root = new MetadataTreeNode( DUMMY_ROOT, null, null );
-
-            for ( MetadataTreeNode kid : deps )
-                root.addChild( kid );
-
-        }
-        else
-        {
-            DUMMY_ROOT.setDependencies( filteredMDs );
-            root = buildTree( DUMMY_ROOT, scope );
-        }
+        DUMMY_ROOT.setDependencies( filteredMDs );
+        root = buildTree( DUMMY_ROOT, scope );
 
         TruckLoad tl = null;
 



Mime
View raw message