Package org.xwiki.test.integration.maven
Class ArtifactCoordinate
- java.lang.Object
-
- org.xwiki.test.integration.maven.ArtifactCoordinate
-
public class ArtifactCoordinate extends Object
Represents an artifact coordinate but with optional version (theDefaultArtifact
implementation doesn't support optional versions which is why we needed this class).- Since:
- 11.2RC1
- Version:
- $Id: 4651562f05846deb3484e4d32976fd1b3cc49d6d $
-
-
Constructor Summary
Constructors Constructor Description ArtifactCoordinate(String groupId, String artifactId, String type, String version)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object object)
String
getArtifactId()
String
getGroupId()
String
getType()
String
getVersion()
int
hashCode()
static ArtifactCoordinate
parseArtifacts(String coordinateAsString)
Parse an Artifact coordinate as a String.org.eclipse.aether.artifact.Artifact
toArtifact(String defaultVersion)
String
toString()
-
-
-
Method Detail
-
getGroupId
public String getGroupId()
- Returns:
- the group id
-
getArtifactId
public String getArtifactId()
- Returns:
- the artifact id
-
getVersion
public String getVersion()
- Returns:
- the version, which can be null
-
getType
public String getType()
- Returns:
- the type (e.g. "jar")
-
toArtifact
public org.eclipse.aether.artifact.Artifact toArtifact(String defaultVersion)
- Parameters:
defaultVersion
- the default version is none is defined- Returns:
- the Artifact object
-
parseArtifacts
public static ArtifactCoordinate parseArtifacts(String coordinateAsString)
Parse an Artifact coordinate as a String. Note that version is optional (as opposed to Aether's @link DefaultArtifact} implementation- Parameters:
coordinateAsString
- the coordinate to parse (e.g.org.xwiki.contrib:myartifact
ororg.xwiki.contrib:myartifact:jar:1.0-SNAPSHOT
ororg.xwiki.contrib:myartifact:1.0-SNAPSHOT
)- Returns:
- the
ArtifactCoordinate
object representing the parsed string
-
-