You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2022/12/09 15:39:57 UTC

[GitHub] [maven-resolver] kwin commented on a diff in pull request #228: [MRESOLVER-305] Handle blocked state at connector level

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


##########
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:
   we should probably have some tests, because to me it is not clear where this exception is caught and logged. Does it prevent other remote repos from being tried or not?



-- 
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-unsubscribe@maven.apache.org

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