1 package org.apache.maven.plugins.annotations;
2
3 /*
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
19 * under the License.
20 */
21
22 /**
23 * Dependencies resolution scopes available before
24 * <a href="/ref/current/maven-core/apidocs/org/apache/maven/lifecycle/internal/MojoExecutor.html">mojo execution</a>.
25 *
26 * Important note: The {@code id} values of this enum correspond to constants of
27 * {@code org.apache.maven.artifact.Artifact} class and MUST BE KEPT IN SYNC.
28 *
29 * @author Hervé Boutemy
30 * @since 3.0
31 */
32 public enum ResolutionScope
33 {
34 /**
35 * empty resolution scope
36 */
37 NONE( null ),
38 /**
39 * <code>compile</code> resolution scope
40 * = <code>compile</code> + <code>system</code> + <code>provided</code> dependencies
41 */
42 COMPILE( "compile" ),
43 /**
44 * <code>compile+runtime</code> resolution scope (Maven 3 only)
45 * = <code>compile</code> + <code>system</code> + <code>provided</code> + <code>runtime</code> dependencies
46 */
47 COMPILE_PLUS_RUNTIME( "compile+runtime" ),
48 /**
49 * <code>runtime</code> resolution scope
50 * = <code>compile</code> + <code>runtime</code> dependencies
51 */
52 RUNTIME( "runtime" ),
53 /**
54 * <code>runtime+system</code> resolution scope (Maven 3 only)
55 * = <code>compile</code> + <code>system</code> + <code>runtime</code> dependencies
56 */
57 RUNTIME_PLUS_SYSTEM( "runtime+system" ),
58 /**
59 * <code>test</code> resolution scope
60 * = <code>compile</code> + <code>system</code> + <code>provided</code> + <code>runtime</code> + <code>test</code>
61 * dependencies
62 */
63 TEST( "test" );
64
65 private final String id;
66
67 ResolutionScope( String id )
68 {
69 this.id = id;
70 }
71
72 public String id()
73 {
74 return this.id;
75 }
76 }