MartinKanters commented on a change in pull request #342: URL: https://github.com/apache/maven/pull/342#discussion_r436112546
########## File path: maven-core/src/main/java/org/apache/maven/execution/BuildResumptionManager.java ########## @@ -0,0 +1,74 @@ +package org.apache.maven.execution; + +/* + * 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 org.apache.maven.project.MavenProject; + +import java.util.List; + +/** + * This class describes most of the logic needed for the --resume / -r feature. Its goal is to ensure newer + * builds of the same project that have the -r command-line flag skip successfully built projects during earlier + * invocations of Maven. + */ +public interface BuildResumptionManager +{ + /** + * Persists any data needed to resume the build at a later point in time, using a new Maven invocation. This method + * may also decide it is not needed or meaningful to persist such data, and return <code>false</code> to indicate + * so. + * + * @param result The result of the current Maven invocation. + * @param rootProject The root project that is being built. + * @return Whether any data was persisted. + */ + boolean persistResumptionData( final MavenExecutionResult result, final MavenProject rootProject ); Review comment: I agree that it false has 2 meanings and that the calling method would like to act differently upon it. But an IOException will leak the internal logic to the outside (that it is using filesystem for storing this data) and it might potentially give problems later if we would get a different implementation. I'm thinking of creating a specific Exception, wrapping the IOException. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org