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.eclipse.aether.artifact;
20  
21  import org.eclipse.aether.RepositorySystemSession;
22  
23  /**
24   * The keys for common properties of artifacts.
25   *
26   * @see Artifact#getProperties()
27   */
28  public final class ArtifactProperties {
29  
30      /**
31       * A high-level characterization of the artifact, e.g. "maven-plugin" or "test-jar".
32       *
33       * @see ArtifactType#getId()
34       */
35      public static final String TYPE = "type";
36  
37      /**
38       * The programming language this artifact is relevant for, e.g. "java" or "none".
39       */
40      public static final String LANGUAGE = "language";
41  
42      /**
43       * The (expected) path to the artifact on the local filesystem. An artifact which has this property set is assumed
44       * to be not present in any regular repository and likewise has no artifact descriptor. Artifact resolution will
45       * verify the path and resolve the artifact if the path actually denotes an existing file. If the path isn't valid,
46       * resolution will fail and no attempts to search local/remote repositories are made.
47       *
48       * @deprecated since 2.0, the semantic carried by this property and the fact this property is coupled to Resolver
49       * 1.x "system" scope (that was delegated to consumer application) implies this property should not be used anymore,
50       * instead, the {@link org.eclipse.aether.scope.ScopeManager} exposed via method
51       * {@link RepositorySystemSession#getScopeManager()} should be used.
52       */
53      @Deprecated
54      public static final String LOCAL_PATH = "localPath";
55  
56      /**
57       * A boolean flag indicating whether the artifact presents some kind of bundle that physically includes its
58       * dependencies, e.g. a fat WAR.
59       *
60       * @deprecated since 2.0, the semantic carried by this property should be defined in a custom
61       *             {@link org.eclipse.aether.collection.DependencyTraverser} implementation provided by the resolver
62       *             consumer
63       */
64      @Deprecated
65      public static final String INCLUDES_DEPENDENCIES = "includesDependencies";
66  
67      /**
68       * A boolean flag indicating whether the artifact is meant to be used for the compile/runtime/test build path of a
69       * consumer project.
70       * <p>
71       * Note: This property is about "build path", whatever it means in the scope of the consumer project. It is NOT
72       * about Java classpath or anything alike. How artifact is being consumed depends heavily on the consumer project.
73       * Resolver is and will remain agnostic of consumer project use cases.
74       *
75       * @deprecated since 2.0, this property should be defined by the resolver consumer along with the {@link ArtifactType}
76       *             implementation
77       */
78      @Deprecated
79      public static final String CONSTITUTES_BUILD_PATH = "constitutesBuildPath";
80  
81      /**
82       * The URL to a web page from which the artifact can be manually downloaded. This URL is not contacted by the
83       * repository system but serves as a pointer for the end user to assist in getting artifacts that are not published
84       * in a proper repository.
85       */
86      public static final String DOWNLOAD_URL = "downloadUrl";
87  
88      private ArtifactProperties() {
89          // hide constructor
90      }
91  }