001package 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/**
023 * Dependencies resolution scopes available before
024 * <a href="/ref/current/maven-core/apidocs/org/apache/maven/lifecycle/internal/MojoExecutor.html">mojo execution</a>.
025 *
026 * Important note: The {@code id} values of this enum correspond to constants of
027 * {@code org.apache.maven.artifact.Artifact} class and MUST BE KEPT IN SYNC.
028 *
029 * @author Hervé Boutemy
030 * @since 3.0
031 */
032public enum ResolutionScope
033{
034    /**
035     * empty resolution scope
036     */
037    NONE( null ),
038    /**
039     * <code>compile</code> resolution scope
040     * = <code>compile</code> + <code>system</code> + <code>provided</code> dependencies
041     */
042    COMPILE( "compile" ),
043    /**
044     * <code>compile+runtime</code> resolution scope (Maven 3 only)
045     * = <code>compile</code> + <code>system</code> + <code>provided</code> + <code>runtime</code> dependencies
046     */
047    COMPILE_PLUS_RUNTIME( "compile+runtime" ),
048    /**
049     * <code>runtime</code> resolution scope
050     * = <code>compile</code> + <code>runtime</code> dependencies
051     */
052    RUNTIME( "runtime" ),
053    /**
054     * <code>runtime+system</code> resolution scope (Maven 3 only)
055     * = <code>compile</code> + <code>system</code> + <code>runtime</code> dependencies
056     */
057    RUNTIME_PLUS_SYSTEM( "runtime+system" ),
058    /**
059     * <code>test</code> resolution scope
060     * = <code>compile</code> + <code>system</code> + <code>provided</code> + <code>runtime</code> + <code>test</code>
061     * dependencies
062     */
063    TEST( "test" );
064
065    private final String id;
066
067    ResolutionScope( String id )
068    {
069        this.id = id;
070    }
071
072    public String id()
073    {
074        return this.id;
075    }
076}