|
ShrinkWrap Resolver Aggregator 1.1.0-alpha-2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MavenDependency
Describes Maven Resolution Element. Contract encapsulates Maven dependency as known from POM files.
Method Summary | |
---|---|
MavenDependency |
addExclusions(String... exclusion)
Adds one or more exclusions for current dependency |
String |
getCoordinates()
Gets coordinates of the dependency |
String[] |
getExclusions()
Gets all exclusions defined on the dependency |
String |
getScope()
Gets scope of the dependency |
boolean |
hasSameArtifactAs(MavenDependency other)
Checks if other dependency defined the same artifact, that is Maven will resolve the same artifact from the other dependency. |
boolean |
hasSameArtifactAs(String other)
Checks if other coordinates defines the same artifact, that is Maven will resolve the same artifact from the other coordinates. |
boolean |
isOptional()
Gets optional flag. |
MavenDependency |
setCoordinates(String coordinates)
Sets coordinates. |
MavenDependency |
setOptional(boolean optional)
Sets dependency as optional. |
MavenDependency |
setScope(String scope)
Sets scope of the Maven dependency |
Method Detail |
---|
MavenDependency setCoordinates(String coordinates)
coordinates
- The artifact coordinates in the format
<groupId>:<artifactId>[:<extension>[:<classifier>]]:<version>
, must not be null
or empty.
String getCoordinates()
MavenDependency setScope(String scope)
scope
- The scope to be set
String getScope()
MavenDependency addExclusions(String... exclusion)
exclusion
- Array of exclusions to be added, in form <groupId>:<artifactId>[:<extension>[:<classifier>]]
or
*
to exclude all transitive dependencies
String[] getExclusions()
MavenDependency setOptional(boolean optional)
optional
- The optional flag to set
boolean isOptional()
true
if dependency is optional,false
otherwiseboolean hasSameArtifactAs(MavenDependency other)
Coordinates cannot be compared directly, see reason below.
To implement this method, developer must be aware that effectively
other
- The other dependency
true
if other has the same artifact definition, false
otherwiseboolean hasSameArtifactAs(String other)
Coordinates cannot be compared directly, see reason below.
To implement this method, developer must be aware that effectively
other
- The other dependency
true
if other has the same artifact definition, false
otherwise
|
ShrinkWrap Resolver Aggregator 1.1.0-alpha-2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |