001    package org.apache.maven.lifecycle.internal;
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.execution.MavenExecutionResult;
023    
024    /**
025     * Context that is fixed for the entire reactor build.
026     * 
027     * @since 3.0
028     * @author Jason van Zyl
029     * @author Kristian Rosenvold
030     *         NOTE: This class is not part of any public api and can be changed or deleted without prior notice.
031     */
032    public class ReactorContext
033    {
034        private final MavenExecutionResult result;
035    
036        private final ProjectIndex projectIndex;
037    
038        private final ClassLoader originalContextClassLoader;
039    
040        private final ReactorBuildStatus reactorBuildStatus;
041    
042    
043        public ReactorContext( MavenExecutionResult result, ProjectIndex projectIndex,
044                               ClassLoader originalContextClassLoader, ReactorBuildStatus reactorBuildStatus )
045        {
046            this.result = result;
047            this.projectIndex = projectIndex;
048            this.originalContextClassLoader = originalContextClassLoader;
049            this.reactorBuildStatus = reactorBuildStatus;
050        }
051    
052        public ReactorBuildStatus getReactorBuildStatus()
053        {
054            return reactorBuildStatus;
055        }
056    
057        public MavenExecutionResult getResult()
058        {
059            return result;
060        }
061    
062        public ProjectIndex getProjectIndex()
063        {
064            return projectIndex;
065        }
066    
067        public ClassLoader getOriginalContextClassLoader()
068        {
069            return originalContextClassLoader;
070        }
071    
072    }