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. 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 * 048 * @deprecated 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.SystemScopeHandler} exposed via method 051 * {@link RepositorySystemSession#getSystemScopeHandler()} should be used. 052 */ 053 @Deprecated 054 public static final String LOCAL_PATH = "localPath"; 055 056 /** 057 * A boolean flag indicating whether the artifact presents some kind of bundle that physically includes its 058 * dependencies, e.g. a fat WAR. 059 * 060 * @deprecated since 2.0, the semantic carried by this property should be defined in a custom 061 * {@link org.eclipse.aether.collection.DependencyTraverser} implementation provided by the resolver 062 * consumer 063 */ 064 @Deprecated 065 public static final String INCLUDES_DEPENDENCIES = "includesDependencies"; 066 067 /** 068 * A boolean flag indicating whether the artifact is meant to be used for the compile/runtime/test build path of a 069 * consumer project. 070 * <p> 071 * Note: This property is about "build path", whatever it means in the scope of the consumer project. It is NOT 072 * about Java classpath or anything alike. How artifact is being consumed depends heavily on the consumer project. 073 * Resolver is and will remain agnostic of consumer project use cases. 074 * 075 * @deprecated since 2.0, this property should be defined by the resolver consumer along with the {@link ArtifactType} 076 * implementation 077 */ 078 @Deprecated 079 public static final String CONSTITUTES_BUILD_PATH = "constitutesBuildPath"; 080 081 /** 082 * The URL to a web page from which the artifact can be manually downloaded. This URL is not contacted by the 083 * repository system but serves as a pointer for the end user to assist in getting artifacts that are not published 084 * in a proper repository. 085 */ 086 public static final String DOWNLOAD_URL = "downloadUrl"; 087 088 private ArtifactProperties() { 089 // hide constructor 090 } 091}