|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.modeshape.maven.MavenId
public class MavenId
Identifier of a Maven 2 artifact.
Nested Class Summary | |
---|---|
class |
MavenId.Version
|
Constructor Summary | |
---|---|
MavenId(String coordinates)
Create an Maven ID from the supplied string containing the coordinates for a Maven artifact. |
|
MavenId(String groupId,
String artifactId)
Create a Maven ID from the supplied group and artifact IDs. |
|
MavenId(String groupId,
String artifactId,
String version)
Create a Maven ID from the supplied group and artifact IDs and the version. |
|
MavenId(String groupId,
String artifactId,
String version,
String classifier)
Create a Maven ID from the supplied group ID, artifact ID, version, and classifier. |
Method Summary | |
---|---|
MavenId |
clone()
|
int |
compareTo(MavenId that)
|
static MavenId[] |
createClasspath(MavenId... mavenIds)
Create a classpath of MavenId s by examining the supplied IDs and removing any duplicates. |
static MavenId[] |
createClasspath(String... mavenCoordinates)
Build a classpath of MavenId s by parsing the supplied Maven artifact coordinates. |
static MavenId[] |
createClasspath(String commaSeparatedCoordinates)
Build a classpath of MavenId s by parsing the supplied string containing comma-separated Maven artifact
coordinates. |
static MavenId |
createFromCoordinates(String coordinates)
|
boolean |
equals(Object obj)
|
String |
getArtifactId()
The identifier for this artifact that is unique within the group given by the group ID. |
String |
getClassifier()
|
String |
getCoordinates()
|
String |
getGroupId()
A universally unique identifier for a project. |
String |
getRelativePath()
Return the relative JCR path for this resource, built from the components of the group ID , the
artifact ID , and the version . |
String |
getRelativePath(boolean includeVersion)
Return the relative JCR path for this resource, built from the components of the group ID , the
artifact ID , and the version . |
String |
getRelativePath(TextEncoder escapingStrategy)
Return the relative JCR path for this resource, built from the components of the group ID , the
artifact ID , and the version . |
String |
getRelativePath(TextEncoder escapingStrategy,
boolean includeVersion)
Return the relative JCR path for this resource, built from the components of the group ID , the
artifact ID , and the version . |
String |
getVersion()
|
protected static Object[] |
getVersionComponents(String version)
Utility to break down the version string into the individual components. |
int |
hashCode()
|
protected boolean |
isAnyVersion()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MavenId(String coordinates)
groupId:artifactId[:version[:classifier]]where
org.modeshape
), which may not be empty
modeshape-maven
), which may not be empty
org.modeshape
)
test
or jdk1.4
)
coordinates
- the string containing the Maven coordinates
IllegalArgumentException
- if the supplied string is null or if the string does not match the expected formatpublic MavenId(String groupId, String artifactId)
groupId
- the group identifierartifactId
- the artifact identifier
IllegalArgumentException
- if the group or artifact identifiers are null, empty or blankpublic MavenId(String groupId, String artifactId, String version)
groupId
- the group identifierartifactId
- the artifact identifierversion
- the version; may be null or empty
IllegalArgumentException
- if the group or artifact identifiers are null, empty or blankpublic MavenId(String groupId, String artifactId, String version, String classifier)
groupId
- the group identifierartifactId
- the artifact identifierversion
- the version; may be null or emptyclassifier
- the classifier; may be null or empty
IllegalArgumentException
- if the group or artifact identifiers are null, empty or blankMethod Detail |
---|
public static MavenId[] createClasspath(String commaSeparatedCoordinates)
MavenId
s by parsing the supplied string containing comma-separated Maven artifact
coordinates. Any duplicates in the classpath are excluded.
commaSeparatedCoordinates
- the string of Maven artifact coordinates
MavenId
instances representing the classpathpublic static MavenId[] createClasspath(String... mavenCoordinates)
MavenId
s by parsing the supplied Maven artifact coordinates. Any duplicates in the classpath
are excluded.
mavenCoordinates
- the array of Maven artifact coordinates
MavenId
instances representing the classpathpublic static MavenId[] createClasspath(MavenId... mavenIds)
MavenId
s by examining the supplied IDs and removing any duplicates.
mavenIds
- the Maven IDs
MavenId
instances representing the classpathpublic String getGroupId()
org.apache.maven
).
public String getArtifactId()
public String getClassifier()
public String getVersion()
public String getRelativePath()
group ID
, the
artifact ID
, and the version
.
public String getRelativePath(TextEncoder escapingStrategy)
group ID
, the
artifact ID
, and the version
.
escapingStrategy
- the strategy to use for escaping characters that are not allowed in JCR names.
public String getRelativePath(boolean includeVersion)
group ID
, the
artifact ID
, and the version
.
includeVersion
- true if the version is to be included in the path
public String getRelativePath(TextEncoder escapingStrategy, boolean includeVersion)
group ID
, the
artifact ID
, and the version
.
escapingStrategy
- the strategy to use for escaping characters that are not allowed in JCR names.includeVersion
- true if the version is to be included in the path
public String getCoordinates()
public static MavenId createFromCoordinates(String coordinates)
protected boolean isAnyVersion()
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public int compareTo(MavenId that)
compareTo
in interface Comparable<MavenId>
public String toString()
toString
in class Object
protected static Object[] getVersionComponents(String version)
version
- the version string
String
and Integer
components; never nullpublic MavenId clone()
clone
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |