|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sonatype.aether.util.artifact.AbstractArtifact
org.sonatype.aether.util.artifact.DefaultArtifact
public final class DefaultArtifact
A simple artifact.
| Constructor Summary | |
|---|---|
DefaultArtifact(java.lang.String coords)
Creates a new artifact with the specified coordinates. |
|
DefaultArtifact(java.lang.String coords,
java.util.Map<java.lang.String,java.lang.String> properties)
Creates a new artifact with the specified coordinates and properties. |
|
DefaultArtifact(java.lang.String groupId,
java.lang.String artifactId,
java.lang.String extension,
java.lang.String version)
Creates a new artifact with the specified coordinates. |
|
DefaultArtifact(java.lang.String groupId,
java.lang.String artifactId,
java.lang.String classifier,
java.lang.String extension,
java.lang.String version)
Creates a new artifact with the specified coordinates. |
|
DefaultArtifact(java.lang.String groupId,
java.lang.String artifactId,
java.lang.String classifier,
java.lang.String extension,
java.lang.String version,
ArtifactType type)
Creates a new artifact with the specified coordinates. |
|
DefaultArtifact(java.lang.String groupId,
java.lang.String artifactId,
java.lang.String classifier,
java.lang.String extension,
java.lang.String version,
java.util.Map<java.lang.String,java.lang.String> properties,
ArtifactType type)
Creates a new artifact with the specified coordinates and properties. |
|
DefaultArtifact(java.lang.String groupId,
java.lang.String artifactId,
java.lang.String classifier,
java.lang.String extension,
java.lang.String version,
java.util.Map<java.lang.String,java.lang.String> properties,
java.io.File file)
Creates a new artifact with the specified coordinates, properties and file. |
|
| Method Summary | |
|---|---|
java.lang.String |
getArtifactId()
Gets the artifact identifier of this artifact, for example "maven-model". |
java.lang.String |
getBaseVersion()
Gets the base version of this artifact, for example "1.0-SNAPSHOT". |
java.lang.String |
getClassifier()
Gets the classifier of this artifact, for example "sources". |
java.lang.String |
getExtension()
Gets the (file) extension of this artifact, for example "jar". |
java.io.File |
getFile()
Gets the file of this artifact. |
java.lang.String |
getGroupId()
Gets the group identifier of this artifact, for example "org.apache.maven". |
java.util.Map<java.lang.String,java.lang.String> |
getProperties()
Gets the properties of this artifact. |
java.lang.String |
getProperty(java.lang.String key,
java.lang.String defaultValue)
Gets the specified property. |
java.lang.String |
getVersion()
Gets the version of this artifact, for example "1.0-20100529-1213". |
boolean |
isSnapshot()
Determines whether this artifact uses a snapshot version. |
Artifact |
setFile(java.io.File file)
Sets the file of the artifact. |
Artifact |
setProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Sets the properties for the artifact. |
Artifact |
setVersion(java.lang.String version)
Sets the version of this artifact. |
| Methods inherited from class org.sonatype.aether.util.artifact.AbstractArtifact |
|---|
equals, hashCode, isSnapshot, toBaseVersion, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultArtifact(java.lang.String coords)
coords - The artifact coordinates in the format
<groupId>:<artifactId>[:<extension>[:<classifier>]]:<version>, must not be null.
public DefaultArtifact(java.lang.String coords,
java.util.Map<java.lang.String,java.lang.String> properties)
coords - The artifact coordinates in the format
<groupId>:<artifactId>[:<extension>[:<classifier>]]:<version>, must not be null.properties - The artifact properties, may be null.
public DefaultArtifact(java.lang.String groupId,
java.lang.String artifactId,
java.lang.String extension,
java.lang.String version)
groupId - The group identifier of the artifact, may be null.artifactId - The artifact identifier of the artifact, may be null.extension - The file extension of the artifact, may be null.version - The version of the artifact, may be null.
public DefaultArtifact(java.lang.String groupId,
java.lang.String artifactId,
java.lang.String classifier,
java.lang.String extension,
java.lang.String version)
groupId - The group identifier of the artifact, may be null.artifactId - The artifact identifier of the artifact, may be null.classifier - The classifier of the artifact, may be null.extension - The file extension of the artifact, may be null.version - The version of the artifact, may be null.
public DefaultArtifact(java.lang.String groupId,
java.lang.String artifactId,
java.lang.String classifier,
java.lang.String extension,
java.lang.String version,
ArtifactType type)
null.
groupId - The group identifier of the artifact, may be null.artifactId - The artifact identifier of the artifact, may be null.classifier - The classifier of the artifact, may be null.extension - The file extension of the artifact, may be null.version - The version of the artifact, may be null.type - The artifact type from which to query classifier, file extension and properties, may be null.
public DefaultArtifact(java.lang.String groupId,
java.lang.String artifactId,
java.lang.String classifier,
java.lang.String extension,
java.lang.String version,
java.util.Map<java.lang.String,java.lang.String> properties,
ArtifactType type)
null. If the artifact type specifies properties, those will get merged with the
properties passed directly into the constructor, with the latter properties taking precedence.
groupId - The group identifier of the artifact, may be null.artifactId - The artifact identifier of the artifact, may be null.classifier - The classifier of the artifact, may be null.extension - The file extension of the artifact, may be null.version - The version of the artifact, may be null.properties - The properties of the artifact, may be null.type - The artifact type from which to query classifier, file extension and properties, may be null.
public DefaultArtifact(java.lang.String groupId,
java.lang.String artifactId,
java.lang.String classifier,
java.lang.String extension,
java.lang.String version,
java.util.Map<java.lang.String,java.lang.String> properties,
java.io.File file)
groupId - The group identifier of the artifact, may be null.artifactId - The artifact identifier of the artifact, may be null.classifier - The classifier of the artifact, may be null.extension - The file extension of the artifact, may be null.version - The version of the artifact, may be null.properties - The properties of the artifact, may be null.file - The resolved file of the artifact, may be null.| Method Detail |
|---|
public java.lang.String getGroupId()
Artifact
null.public java.lang.String getArtifactId()
Artifact
null.public java.lang.String getBaseVersion()
ArtifactArtifact.getVersion(), the
base version will always refer to the unresolved meta version.
null.public java.lang.String getVersion()
Artifact
null.public Artifact setVersion(java.lang.String version)
Artifact
setVersion in interface ArtifactsetVersion in class AbstractArtifactversion - The version of this artifact, may be null.
null.public boolean isSnapshot()
Artifact
true if the artifact is a snapshot, false otherwise.public java.lang.String getClassifier()
Artifact
null.public java.lang.String getExtension()
Artifact
null.public java.io.File getFile()
Artifact
null if the artifact isn't resolved.public Artifact setFile(java.io.File file)
Artifact
setFile in interface ArtifactsetFile in class AbstractArtifactfile - The file of the artifact, may be null
null.
public java.lang.String getProperty(java.lang.String key,
java.lang.String defaultValue)
Artifact
key - The name of the property, must not be null.defaultValue - The default value to return in case the property is not set, may be null.public java.util.Map<java.lang.String,java.lang.String> getProperties()
Artifact
null.public Artifact setProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Artifact
setProperties in interface ArtifactsetProperties in class AbstractArtifactproperties - The properties for the artifact, may be null.
null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||