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
022import 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 */
031public enum ResolutionScope
032{
033    /**
034     * empty resolution scope
035     */
036    NONE( null ),
037    /**
038     * <code>compile</code> resolution scope
039     * = <code>compile</code> + <code>system</code> + <code>provided</code> dependencies
040     */
041    COMPILE( Artifact.SCOPE_COMPILE ),
042    /**
043     * <code>compile+runtime</code> resolution scope (Maven 3 only)
044     * = <code>compile</code> + <code>system</code> + <code>provided</code> + <code>runtime</code> dependencies
045     */
046    COMPILE_PLUS_RUNTIME( Artifact.SCOPE_COMPILE_PLUS_RUNTIME ),
047    /**
048     * <code>runtime</code> resolution scope
049     * = <code>compile</code> + <code>runtime</code> dependencies
050     */
051    RUNTIME( Artifact.SCOPE_RUNTIME ),
052    /**
053     * <code>runtime+system</code> resolution scope (Maven 3 only)
054     * = <code>compile</code> + <code>system</code> + <code>runtime</code> dependencies
055     */
056    RUNTIME_PLUS_SYSTEM( Artifact.SCOPE_RUNTIME_PLUS_SYSTEM ),
057    /**
058     * <code>test</code> resolution scope
059     * = <code>compile</code> + <code>system</code> + <code>provided</code> + <code>runtime</code> + <code>test</code>
060     * dependencies
061     */
062    TEST( Artifact.SCOPE_TEST );
063
064    private final String id;
065
066    ResolutionScope( String id )
067    {
068        this.id = id;
069    }
070
071    public String id()
072    {
073        return this.id;
074    }
075}