001    package org.apache.maven.plugins.annotations;
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.Artifact;
023    
024    /**
025     * Dependencies resolution scopes available before
026     * <a href="/ref/current/maven-core/apidocs/org/apache/maven/lifecycle/internal/MojoExecutor.html">mojo execution</a>.
027     *
028     * @author Hervé Boutemy
029     * @since 3.0
030     */
031    public enum ResolutionScope
032    {
033        /**
034         * <code>compile</code> resolution scope
035         * = <code>compile</code> + <code>system</code> + <code>provided</code> dependencies
036         */
037        COMPILE( Artifact.SCOPE_COMPILE ),
038        /**
039         * <code>compile+runtime</code> resolution scope (Maven 3 only)
040         * = <code>compile</code> + <code>system</code> + <code>provided</code> + <code>runtime</code> dependencies
041         */
042        COMPILE_PLUS_RUNTIME( Artifact.SCOPE_COMPILE_PLUS_RUNTIME ),
043        /**
044         * <code>runtime</code> resolution scope
045         * = <code>compile</code> + <code>runtime</code> dependencies
046         */
047        RUNTIME( Artifact.SCOPE_RUNTIME ),
048        /**
049         * <code>runtime+system</code> resolution scope (Maven 3 only)
050         * = <code>compile</code> + <code>system</code> + <code>runtime</code> dependencies
051         */
052        RUNTIME_PLUS_SYSTEM( Artifact.SCOPE_RUNTIME_PLUS_SYSTEM ),
053        /**
054         * <code>test</code> resolution scope
055         * = <code>compile</code> + <code>system</code> + <code>provided</code> + <code>runtime</code> + <code>test</code>
056         * dependencies
057         */
058        TEST( Artifact.SCOPE_TEST );
059    
060        private final String id;
061    
062        ResolutionScope( String id )
063        {
064            this.id = id;
065        }
066    
067        public String id()
068        {
069            return this.id;
070        }
071    }