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