ShrinkWrap Resolver Maven API 2.0.0-cr-1

org.jboss.shrinkwrap.resolver.api.maven.coordinate
Interface MavenCoordinate

All Known Subinterfaces:
MavenDependency

public interface MavenCoordinate

Represents a single Maven coordinate (an address in canonical form "groupId:artifactId:packaging:classifier:version") which is capable of resolving to an artifact. Also note that since "packaging" and "classifier" are optional, the following canonical forms are also valid:

When comparing equality by value, all fields except for "version" are considered. To match the sections in POM metadata, the packaging field is also aliased as "type" operations. Type can represent both packaging and classifier for some of the use cases, like test-jar. In such cases, type will act as specifier for both packaging and classifier transparently to user.

Author:
Karel Piwko, Andrew Lee Rubinger
See Also:
http://maven.apache.org/pom.html#Maven_Coordinates, http://docs.codehaus.org/display/MAVEN/Packaging+vs+Type+-+Derived+and+Attached+Artifacts

Method Summary
 boolean equals(Object other)
          Determines whether two MavenCoordinate instances are equal by value; all fields are considered except for version
 String getArtifactId()
          Returns the "artifactId" portion of this artifact's coordinates
 String getClassifier()
          Returns the "classifier" portion of this artifact's coordinates.
 String getGroupId()
          Returns the "groupId" portion of this artifact's coordinates
 PackagingType getPackaging()
          Returns the "packaging" portion of this artifact's coordinates; always returns a value.
 PackagingType getType()
          Alias to getPackaging().
 String getVersion()
          Returns the declared "version" portion of this artifact's coordinates, for instance "1.2.0-alpha-2" or "1.2.0-SNAPSHOT".
 int hashCode()
          
 
Methods inherited from interface org.jboss.shrinkwrap.resolver.api.Coordinate
toCanonicalForm
 

Method Detail

getPackaging

PackagingType getPackaging()
Returns the "packaging" portion of this artifact's coordinates; always returns a value. Defaults to PackagingType.JAR.

Returns:

getType

PackagingType getType()
Alias to getPackaging().

Returns:

getClassifier

String getClassifier()
Returns the "classifier" portion of this artifact's coordinates.

Returns:

getVersion

String getVersion()
Returns the declared "version" portion of this artifact's coordinates, for instance "1.2.0-alpha-2" or "1.2.0-SNAPSHOT". This is the value of the "version" field as declared in the POM. During artifact resolution, SNAPSHOT versions may be set to a fixed SNAPSHOT as represented by MavenArtifactInfo.getResolvedVersion().

Returns:
The base version, never null.

hashCode

int hashCode()

Overrides:
hashCode in class Object
Returns:

equals

boolean equals(Object other)
Determines whether two MavenCoordinate instances are equal by value; all fields are considered except for version

Overrides:
equals in class Object
Parameters:
other -
Returns:

getGroupId

String getGroupId()
Returns the "groupId" portion of this artifact's coordinates

Returns:

getArtifactId

String getArtifactId()
Returns the "artifactId" portion of this artifact's coordinates

Returns:

ShrinkWrap Resolver Maven API 2.0.0-cr-1

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.