public class Artifact
extends java.lang.Object
This class defines an artifact as it exists across all projects, dependencies, etc. This class is the representation of the artifact that is defined by its group, project, name, type and version. This object is also the representation of a dependency between two project's.
See the Artifact(String, boolean)
constructor for String formats of artifacts.
Modifier and Type | Field and Description |
---|---|
ArtifactID |
id |
boolean |
skipCompatibilityCheck |
Version |
version |
Constructor and Description |
---|
Artifact(ArtifactID id,
Version version,
boolean skipCompatibilityCheck)
Constructs an Artifact with the given ID and version.
|
Artifact(java.lang.String spec,
boolean skipCompatibilityCheck)
Parses the given specification to build an artifact.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getArtifactFile()
Returns the artifact file name.
|
java.lang.String |
getArtifactMetaDataFile()
Returns the artifact MetaData file name.
|
java.lang.String |
getArtifactSourceFile()
Returns the artifact source file name.
|
java.lang.String |
getArtifactTestFile()
Returns the artifact test file name.
|
java.lang.String |
getArtifactTestSourceFile()
Returns the artifact test source file name.
|
int |
hashCode() |
boolean |
isIntegrationBuild() |
java.lang.String |
toString() |
public final ArtifactID id
public final boolean skipCompatibilityCheck
public final Version version
public Artifact(ArtifactID id, Version version, boolean skipCompatibilityCheck)
id
- The artifact ID (group, project, name, type).version
- The version of the artifact.skipCompatibilityCheck
- Determines if the compatibility check is skipped for this artifact or not.public Artifact(java.lang.String spec, boolean skipCompatibilityCheck)
Parses the given specification to build an artifact. The currently supported spec formats are:
group:project:version group:project:version:type group:project:name:version:type
Examples:
org.savantbuild.dep:savant-dependency-management:0.1 org.savantbuild.dep:savant-dependency-management:0.1:jar org.savantbuild.dep:savant-dependency-management:some-other-artifact:0.1:jar
spec
- The spec.skipCompatibilityCheck
- Determines if the compatibility check is skipped for this artifact or not.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String getArtifactFile()
Returns the artifact file name. This does not include any path information at all and would look something like this:
common-collections-2.1.jar
public java.lang.String getArtifactMetaDataFile()
Returns the artifact MetaData file name. This does not include any path information at all and would look something like this:
common-collections-2.1.jar.amd
public java.lang.String getArtifactSourceFile()
Returns the artifact source file name. This does not include any path information at all and would look something like this:
common-collections-2.1-src.jar
public java.lang.String getArtifactTestFile()
Returns the artifact test file name. This does not include any path information at all and would look something like this:
common-collections-test-2.1.jar
public java.lang.String getArtifactTestSourceFile()
Returns the artifact test source file name. This does not include any path information at all and would look something like this:
common-collections-test-2.1.jar
public int hashCode()
hashCode
in class java.lang.Object
public boolean isIntegrationBuild()
public java.lang.String toString()
toString
in class java.lang.Object