Package org.glassfish.spec
Class Artifact
java.lang.Object
org.glassfish.spec.Artifact
Represent the API JAR file as a Maven artifact.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringArtifact artifactId.private StringArtifact groupId.private static final StringThe Release Candidate qualifier.private static final StringThe Maven SNAPSHOT qualifier.private org.apache.maven.artifact.versioning.ArtifactVersionArtifact version. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic ArtifactCreate anArtifactinstance from a given JAR file.Get the normalized release version for this artifact.Get the artifactId for this artifact.Get the groupId for this artifact.private static ZipEntryGet theZipEntryforpom.propertiesin the given JAR file.org.apache.maven.artifact.versioning.ArtifactVersionGet the version for this artifact.inthashCode()voidsetArtifactId(String aId) Set the artifactId of this artifact.voidsetGroupId(String gId) Set the groupId of this artifact.voidsetVersion(String v) Set the version of this artifact.static StringstripSnapshotOrRcQualifier(String version) Strip the SNAPSHOT or RC qualifier from a given version.toString()
-
Field Details
-
groupId
Artifact groupId. -
artifactId
Artifact artifactId. -
version
private org.apache.maven.artifact.versioning.ArtifactVersion versionArtifact version. -
SNAPSHOT_QUALIFIER
The Maven SNAPSHOT qualifier.- See Also:
-
RC_QUALIFIER
The Release Candidate qualifier.- See Also:
-
-
Constructor Details
-
Method Details
-
stripSnapshotOrRcQualifier
Strip the SNAPSHOT or RC qualifier from a given version.- Parameters:
version- the qualifier to process- Returns:
- a non SNAPSHOT or RC version
-
getArtifactId
Get the artifactId for this artifact.- Returns:
- the artifactId
-
getGroupId
Get the groupId for this artifact.- Returns:
- the groupId
-
getVersion
public org.apache.maven.artifact.versioning.ArtifactVersion getVersion()Get the version for this artifact.- Returns:
- the version
-
getAbsoluteVersion
Get the normalized release version for this artifact.- Returns:
- the version
-
setArtifactId
Set the artifactId of this artifact.- Parameters:
aId- the artifactId value to use
-
setGroupId
Set the groupId of this artifact.- Parameters:
gId- the artifactId value to use
-
setVersion
Set the version of this artifact.- Parameters:
v- the artifactId value to use
-
getPomPropertiesFile
Get theZipEntryforpom.propertiesin the given JAR file.- Parameters:
jar- the jar file to process- Returns:
- the
ZipEntryif found,nullotherwise
-
fromJar
Create anArtifactinstance from a given JAR file.- Parameters:
jar- the jar file to process- Returns:
- the create
Artifactinstance - Throws:
IOException- if an error occurs while reading JAR file entries
-
toString
-
equals
-
hashCode
public int hashCode()
-