001: package 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:
022: import org.apache.maven.artifact.resolver.ArtifactResolutionResult;
023: import org.apache.maven.project.MavenProject;
024:
025: import java.util.ArrayList;
026: import java.util.List;
027:
028: /** @author Jason van Zyl */
029: public class DefaultMavenExecutionResult implements
030: MavenExecutionResult {
031: private MavenProject project;
032:
033: private List topologicallySortedProjects;
034:
035: private ArtifactResolutionResult artifactResolutionResult;
036:
037: private List exceptions;
038:
039: private ReactorManager reactorManager;
040:
041: public MavenExecutionResult setProject(MavenProject project) {
042: this .project = project;
043:
044: return this ;
045: }
046:
047: public MavenProject getProject() {
048: return project;
049: }
050:
051: public MavenExecutionResult setTopologicallySortedProjects(
052: List topologicallySortedProjects) {
053: this .topologicallySortedProjects = topologicallySortedProjects;
054:
055: return this ;
056: }
057:
058: public List getTopologicallySortedProjects() {
059: return topologicallySortedProjects;
060: }
061:
062: public ArtifactResolutionResult getArtifactResolutionResult() {
063: return artifactResolutionResult;
064: }
065:
066: public MavenExecutionResult setArtifactResolutionResult(
067: ArtifactResolutionResult artifactResolutionResult) {
068: this .artifactResolutionResult = artifactResolutionResult;
069:
070: return this ;
071: }
072:
073: public List getExceptions() {
074: return exceptions;
075: }
076:
077: public MavenExecutionResult addException(Throwable t) {
078: if (exceptions == null) {
079: exceptions = new ArrayList();
080: }
081:
082: exceptions.add(t);
083:
084: return this ;
085: }
086:
087: public boolean hasExceptions() {
088: return (exceptions != null && exceptions.size() > 0);
089: }
090:
091: public ReactorManager getReactorManager() {
092: return reactorManager;
093: }
094:
095: public MavenExecutionResult setReactorManager(
096: ReactorManager reactorManager) {
097: this.reactorManager = reactorManager;
098:
099: return this;
100: }
101: }
|