You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by og...@apache.org on 2009/01/22 09:14:27 UTC

svn commit: r736584 - /maven/mercury/trunk/mercury-plexus/src/main/java/org/apache/maven/mercury/plexus/DefaultPlexusMercury.java

Author: ogusakov
Date: Thu Jan 22 00:14:27 2009
New Revision: 736584

URL: http://svn.apache.org/viewvc?rev=736584&view=rev
Log:
fixed reading multiple repos

Modified:
    maven/mercury/trunk/mercury-plexus/src/main/java/org/apache/maven/mercury/plexus/DefaultPlexusMercury.java

Modified: maven/mercury/trunk/mercury-plexus/src/main/java/org/apache/maven/mercury/plexus/DefaultPlexusMercury.java
URL: http://svn.apache.org/viewvc/maven/mercury/trunk/mercury-plexus/src/main/java/org/apache/maven/mercury/plexus/DefaultPlexusMercury.java?rev=736584&r1=736583&r2=736584&view=diff
==============================================================================
--- maven/mercury/trunk/mercury-plexus/src/main/java/org/apache/maven/mercury/plexus/DefaultPlexusMercury.java (original)
+++ maven/mercury/trunk/mercury-plexus/src/main/java/org/apache/maven/mercury/plexus/DefaultPlexusMercury.java Thu Jan 22 00:14:27 2009
@@ -226,8 +226,11 @@
     if( ar == null || !ar.hasResults() )
       return null;
 
-    if( ar.hasExceptions() )
-      throw new RepositoryException( ar.getExceptions().toString() );
+    if( ar.hasExceptions() && LOG.isWarnEnabled() )
+      LOG.info( ar.getExceptions().toString() );
+    
+    if( !ar.hasResults() )
+      return null;
 
     Map<ArtifactBasicMetadata, List<Artifact>> am = ar.getResults();
     
@@ -296,18 +299,6 @@
     try
     {
       DependencyBuilder depBuilder = DependencyBuilderFactory.create( DependencyBuilderFactory.JAVA_DEPENDENCY_MODEL, repos );
-      
-//      ArtifactBasicMetadata a = artifacts.getMetadataList().get( 0 );
-//
-//      if( inclusions != null && ! inclusions.isEmpty() )
-//        a.setInclusions( inclusions.getMetadataList() );
-//
-//      if( exclusions != null && ! exclusions.isEmpty() )
-//        a.setExclusions( exclusions.getMetadataList() );
-//      
-//      MetadataTreeNode root = depBuilder.buildTree( a, scope );
-//      
-//    List<ArtifactMetadata> res = depBuilder.resolveConflicts( root );
 
       List<ArtifactMetadata> res = depBuilder.resolveConflicts( scope, artifacts, inclusions, exclusions );
     
@@ -341,8 +332,8 @@
       if( res == null )
           return null;
 
-      if( res.hasExceptions() )
-          throw new RepositoryException( res.getExceptions().toString() );
+      if( res.hasExceptions() && LOG.isWarnEnabled() )
+          LOG.warn( res.getExceptions().toString() );
 
       return res.getResult( query );
   }