Package org.infinispan.cli.artifacts
Class MavenArtifact
- java.lang.Object
-
- org.infinispan.cli.artifacts.AbstractArtifact
-
- org.infinispan.cli.artifacts.MavenArtifact
-
- All Implemented Interfaces:
Artifact
public final class MavenArtifact extends AbstractArtifact
Maven artifact coordinate specification.- Author:
- David M. Lloyd
-
-
Field Summary
-
Fields inherited from class org.infinispan.cli.artifacts.AbstractArtifact
force, verbose
-
-
Constructor Summary
Constructors Constructor Description MavenArtifact(String groupId, String artifactId, String version)Construct a new instance with an empty classifier.MavenArtifact(String groupId, String artifactId, String version, String classifier)Construct a new instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MavenArtifactfromString(String string)Parse a string and produce artifact coordinates from it.static booleanisMavenArtifact(String string)StringrelativeArtifactPath(char separator)Create a relative repository path for the given artifact coordinates.PathresolveArtifact()StringtoString()Get the string representation.-
Methods inherited from class org.infinispan.cli.artifacts.AbstractArtifact
force, verbose
-
-
-
-
Constructor Detail
-
MavenArtifact
public MavenArtifact(String groupId, String artifactId, String version, String classifier)
Construct a new instance.- Parameters:
groupId- the group ID (must not benull)artifactId- the artifact ID (must not benull)version- the version string (must not benull)classifier- the classifier string (must not benull, may be empty)
-
-
Method Detail
-
fromString
public static MavenArtifact fromString(String string)
Parse a string and produce artifact coordinates from it.- Parameters:
string- the string to parse (must not benull)- Returns:
- the artifact coordinates object (not
null)
-
isMavenArtifact
public static boolean isMavenArtifact(String string)
-
resolveArtifact
public Path resolveArtifact() throws IOException
- Throws:
IOException
-
relativeArtifactPath
public String relativeArtifactPath(char separator)
Create a relative repository path for the given artifact coordinates.- Parameters:
separator- the separator character to use (typically'/'orFile.separatorChar)- Returns:
- the path string
-
-