cstamas commented on code in PR #197:
URL: https://github.com/apache/maven-resolver/pull/197#discussion_r990616796
##########
maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultArtifactResolver.java:
##########
@@ -282,10 +297,31 @@ private List<ArtifactResult> resolve(
RepositorySystemSession session,
continue;
}
+ List<RemoteRepository> remoteRepositories =
request.getRepositories();
+ List<RemoteRepository> filteredRemoteRepositories = new
ArrayList<>( remoteRepositories.size() );
+ for ( RemoteRepository repository : remoteRepositories )
+ {
+ RemoteRepositoryFilter.Result filterResult =
filter.acceptArtifact( repository, artifact );
+ if ( !filterResult.isAccepted() )
+ {
+ result.addException( new ArtifactNotFoundException(
artifact, repository,
+ filterResult.reasoning() ) );
Review Comment:
Yes, this is common way to communicate (up to the surface) why resolution
failed, see here
https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultArtifactResolver.java#L380-L384
and here
https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultArtifactResolver.java#L418-L425
and here
https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultMetadataResolver.java#L222
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]