001package org.apache.maven.execution; 002 003/* 004 * Licensed to the Apache Software Foundation (ASF) under one 005 * or more contributor license agreements. See the NOTICE file 006 * distributed with this work for additional information 007 * regarding copyright ownership. The ASF licenses this file 008 * to you under the Apache License, Version 2.0 (the 009 * "License"); you may not use this file except in compliance 010 * with the License. You may obtain a copy of the License at 011 * 012 * http://www.apache.org/licenses/LICENSE-2.0 013 * 014 * Unless required by applicable law or agreed to in writing, 015 * software distributed under the License is distributed on an 016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 017 * KIND, either express or implied. See the License for the 018 * specific language governing permissions and limitations 019 * under the License. 020 */ 021 022import java.util.List; 023 024import org.apache.maven.project.DependencyResolutionResult; 025import org.apache.maven.project.MavenProject; 026 027/** 028 * @author Jason van Zyl 029 */ 030public interface MavenExecutionResult 031{ 032 MavenExecutionResult setProject( MavenProject project ); 033 MavenProject getProject(); 034 035 MavenExecutionResult setTopologicallySortedProjects( List<MavenProject> projects ); 036 037 /** 038 * @return the sorted list, or an empty list if there are no projects. 039 */ 040 List<MavenProject> getTopologicallySortedProjects(); 041 042 MavenExecutionResult setDependencyResolutionResult( DependencyResolutionResult result ); 043 DependencyResolutionResult getDependencyResolutionResult(); 044 045 // for each exception 046 // - knowing what artifacts are missing 047 // - project building exception 048 // - invalid project model exception: list of markers 049 // - xmlpull parser exception 050 List<Throwable> getExceptions(); 051 052 MavenExecutionResult addException( Throwable e ); 053 054 boolean hasExceptions(); 055 056 /** 057 * Gets the build summary for the specified project. 058 * 059 * @param project The project to get the build summary for, must not be {@code null}. 060 * @return The build summary for the project or {@code null} if the project has not been built (yet). 061 */ 062 BuildSummary getBuildSummary( MavenProject project ); 063 064 /** 065 * Add the specified build summary. 066 * 067 * @param summary The build summary to add, must not be {@code null}. 068 */ 069 void addBuildSummary( BuildSummary summary ); 070}