kwin commented on code in PR #228:
URL: https://github.com/apache/maven-resolver/pull/228#discussion_r1044590603


##########
maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultRepositoryConnectorProvider.java:
##########
@@ -109,6 +109,20 @@ public RepositoryConnector newRepositoryConnector( 
RepositorySystemSession sessi
         throws NoRepositoryConnectorException
     {
         requireNonNull( repository, "remote repository cannot be null" );
+
+        if ( repository.isBlocked() )
+        {
+            if ( repository.getMirroredRepositories().isEmpty() )
+            {
+                throw new NoRepositoryConnectorException( repository, "Blocked 
repository: " + repository );

Review Comment:
   But if I have 1 blocked remote repo and one not-blocked one I expect the 
latter to be used instead (if possible). Resolving should only fail if the 
requested artifact/metadata could not be delivered from any non-blocked remote 
repo.



##########
maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultRepositoryConnectorProvider.java:
##########
@@ -109,6 +109,20 @@ public RepositoryConnector newRepositoryConnector( 
RepositorySystemSession sessi
         throws NoRepositoryConnectorException
     {
         requireNonNull( repository, "remote repository cannot be null" );
+
+        if ( repository.isBlocked() )
+        {
+            if ( repository.getMirroredRepositories().isEmpty() )
+            {
+                throw new NoRepositoryConnectorException( repository, "Blocked 
repository: " + repository );

Review Comment:
   But if I have one blocked remote repo and one not-blocked one I expect the 
latter to be used instead (if possible). Resolving should only fail if the 
requested artifact/metadata could not be delivered from any non-blocked remote 
repo.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to