cstamas commented on code in PR #200: URL: https://github.com/apache/maven-resolver/pull/200#discussion_r990946235
########## maven-resolver-spi/src/main/java/org/eclipse/aether/spi/resolution/ArtifactResolverPostProcessor.java: ########## @@ -0,0 +1,63 @@ +package org.eclipse.aether.spi.resolution; + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import java.util.List; + +import org.eclipse.aether.RepositorySystemSession; +import org.eclipse.aether.resolution.ArtifactResult; + +/** + * Artifact resolver post-resolution processor component, is able to hook into resolver and post-process the resolved + * artifact results, if needed even produce resolution failure. It will always be invoked (even when failure is about + * to happen), so detecting these cases are left to post processor implementations. + * + * @since TBD + */ +public interface ArtifactResolverPostProcessor +{ + /** + * Enum representing post-processing outcome. + */ + enum Outcome + { + /** + * Post-processing was ok, continue. + */ + CONTINUE, Review Comment: originally I had `boolean` instead of this enum, but it made reading the source cumbersome (true = failed or true=passed?), so I just added this enum to clarity sake. Other option is to move whole post-processing BEFORE org/eclipse/aether/internal/impl/DefaultArtifactResolver.java#428... as post processor 'unresolve" (and adds exception to result), so actually this is what am gonna do. Then no need for return value at all, as post processor "communicates" via passed in result states (which is the case even now), -- 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