001/*
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements.  See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership.  The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License.  You may obtain a copy of the License at
009 *
010 *   http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing,
013 * software distributed under the License is distributed on an
014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015 * KIND, either express or implied.  See the License for the
016 * specific language governing permissions and limitations
017 * under the License.
018 */
019package org.apache.maven.plugins.annotations;
020
021/**
022 * Dependencies resolution scopes available before
023 * <a href="/ref/current/maven-core/apidocs/org/apache/maven/lifecycle/internal/MojoExecutor.html">mojo execution</a>.
024 *
025 * Important note: The {@code id} values of this enum correspond to constants of
026 * {@code org.apache.maven.artifact.Artifact} class and MUST BE KEPT IN SYNC.
027 *
028 * @author Hervé Boutemy
029 * @since 3.0
030 */
031public enum ResolutionScope {
032    /**
033     * empty resolution scope
034     */
035    NONE(null),
036    /**
037     * <code>compile</code> resolution scope
038     * = <code>compile</code> + <code>system</code> + <code>provided</code> dependencies
039     */
040    COMPILE("compile"),
041    /**
042     * <code>compile+runtime</code> resolution scope (Maven 3 only)
043     * = <code>compile</code> + <code>system</code> + <code>provided</code> + <code>runtime</code> dependencies
044     */
045    COMPILE_PLUS_RUNTIME("compile+runtime"),
046    /**
047     * <code>runtime</code> resolution scope
048     * = <code>compile</code> + <code>runtime</code> dependencies
049     */
050    RUNTIME("runtime"),
051    /**
052     * <code>runtime+system</code> resolution scope (Maven 3 only)
053     * = <code>compile</code> + <code>system</code> + <code>runtime</code> dependencies
054     */
055    RUNTIME_PLUS_SYSTEM("runtime+system"),
056    /**
057     * <code>test</code> resolution scope
058     * = <code>compile</code> + <code>system</code> + <code>provided</code> + <code>runtime</code> + <code>test</code>
059     * dependencies
060     */
061    TEST("test");
062
063    private final String id;
064
065    ResolutionScope(String id) {
066        this.id = id;
067    }
068
069    public String id() {
070        return this.id;
071    }
072}