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 (theDefaultArtifactimplementation 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 booleanequals(Object object)StringgetArtifactId()StringgetGroupId()StringgetType()StringgetVersion()inthashCode()static ArtifactCoordinateparseArtifacts(String coordinateAsString)Parse an Artifact coordinate as a String.org.eclipse.aether.artifact.ArtifacttoArtifact(String defaultVersion)StringtoString()
-
-
-
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:myartifactororg.xwiki.contrib:myartifact:jar:1.0-SNAPSHOTororg.xwiki.contrib:myartifact:1.0-SNAPSHOT)- Returns:
- the
ArtifactCoordinateobject representing the parsed string
-
-