Class AbstractArtifact
java.lang.Object
org.eclipse.aether.artifact.AbstractArtifact
- All Implemented Interfaces:
Artifact
- Direct Known Subclasses:
DefaultArtifact
A skeleton class for artifacts.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopyProperties(Map<String, String> properties) Copies the specified artifact properties.booleanCompares this artifact with the specified object.Gets the base version of this artifact, for example "1.0-SNAPSHOT".getProperty(String key, String defaultValue) Gets the specified property.inthashCode()Returns a hash code for this artifact.booleanDetermines whether this artifact uses a snapshot version.Sets the file of the artifact.setProperties(Map<String, String> properties) Sets the properties for the artifact.setVersion(String version) Sets the version of the artifact.toString()Methods inherited from interface Artifact
getArtifactId, getClassifier, getExtension, getFile, getGroupId, getProperties, getVersion
-
Constructor Details
-
AbstractArtifact
public AbstractArtifact()
-
-
Method Details
-
isSnapshot
Description copied from interface:ArtifactDetermines whether this artifact uses a snapshot version.- Specified by:
isSnapshotin interfaceArtifact- Returns:
trueif the artifact is a snapshot,falseotherwise.
-
getBaseVersion
Description copied from interface:ArtifactGets the base version of this artifact, for example "1.0-SNAPSHOT". In contrast to theArtifact.getVersion(), the base version will always refer to the unresolved meta version.- Specified by:
getBaseVersionin interfaceArtifact- Returns:
- The base version, never
null.
-
setVersion
Description copied from interface:ArtifactSets the version of the artifact.- Specified by:
setVersionin interfaceArtifact- Parameters:
version- The version of this artifact, may benullor empty.- Returns:
- The new artifact, never
null.
-
setFile
-
setProperties
Description copied from interface:ArtifactSets the properties for the artifact. Note that these properties exist merely in memory and are not persisted when the artifact gets installed/deployed to a repository.- Specified by:
setPropertiesin interfaceArtifact- Parameters:
properties- The properties for the artifact, may benull.- Returns:
- The new artifact, never
null. - See Also:
-
getProperty
Description copied from interface:ArtifactGets the specified property.- Specified by:
getPropertyin interfaceArtifact- Parameters:
key- The name of the property, must not benull.defaultValue- The default value to return in case the property is not set, may benull.- Returns:
- The requested property value or
nullif the property is not set and no default value was provided. - See Also:
-
copyProperties
Copies the specified artifact properties. This utility method should be used when creating new artifact instances with caller-supplied properties.- Parameters:
properties- The properties to copy, may benull.- Returns:
- The copied and read-only properties, never
null.
-
toString
-
equals
Compares this artifact with the specified object. -
hashCode
-