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.eclipse.aether.artifact;
020
021import org.eclipse.aether.RepositorySystemSession;
022
023/**
024 * The keys for common properties of artifacts in Maven 3.
025 *
026 * @see Artifact#getProperties()
027 */
028public final class ArtifactProperties {
029
030    /**
031     * A high-level characterization of the artifact, e.g. "maven-plugin" or "test-jar".
032     *
033     * @see ArtifactType#getId()
034     */
035    public static final String TYPE = "type";
036
037    /**
038     * The programming language this artifact is relevant for, e.g. "java" or "none".
039     */
040    public static final String LANGUAGE = "language";
041
042    /**
043     * The (expected) path to the artifact on the local filesystem. An artifact which has this property set is assumed
044     * to be not present in any regular repository and likewise has no artifact descriptor. Artifact resolution will
045     * verify the path and resolve the artifact if the path actually denotes an existing file. If the path isn't valid,
046     * resolution will fail and no attempts to search local/remote repositories are made.
047     * <p>
048     * Since 2.0, the semantic carried by this property and the fact this property is coupled to Resolver
049     * 1.x "system" scope (that was delegated to consumer application) implies this property should not be used anymore,
050     * instead, the {@link org.eclipse.aether.scope.ScopeManager} exposed via method
051     * {@link RepositorySystemSession#getScopeManager()} can be used.
052     */
053    public static final String LOCAL_PATH = "localPath";
054
055    /**
056     * A boolean flag indicating whether the artifact presents some kind of bundle that physically includes its
057     * dependencies, e.g. a fat WAR.
058     * <p>
059     * Since 2.0, the semantic carried by this property could be defined in a custom
060     * {@link org.eclipse.aether.collection.DependencyTraverser} implementation provided by the resolver consumer.
061     */
062    public static final String INCLUDES_DEPENDENCIES = "includesDependencies";
063
064    /**
065     * A boolean flag indicating whether the artifact is meant to be used for the compile/runtime/test build path of a
066     * consumer project.
067     * <p>
068     * Note: This property is about "build path", whatever it means in the scope of the consumer project. It is NOT
069     * about Java classpath or anything alike. How artifact is being consumed depends heavily on the consumer project.
070     * Resolver is and will remain agnostic of consumer project use cases.
071     * <p>
072     * Since 2.0, this property could be defined by the resolver consumer along with the {@link ArtifactType}
073     * implementation
074     */
075    public static final String CONSTITUTES_BUILD_PATH = "constitutesBuildPath";
076
077    /**
078     * The URL to a web page from which the artifact can be manually downloaded. This URL is not contacted by the
079     * repository system but serves as a pointer for the end user to assist in getting artifacts that are not published
080     * in a proper repository.
081     */
082    public static final String DOWNLOAD_URL = "downloadUrl";
083
084    private ArtifactProperties() {
085        // hide constructor
086    }
087}