|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.maven.ModuleDependency
public final class ModuleDependency
group id + artifact id + version and a flag to know if it's a plugin
ModuleName
,
Serialized FormField Summary | |
---|---|
String |
artifactId
|
String |
groupId
|
static String |
NONE
When a plugin dependency is specified without giving a version, the semantics of that is the latest released plugin. |
boolean |
plugin
|
static String |
UNKNOWN
For compatibility reason, this value may be used in the verion field to indicate that the version is unknown. |
String |
version
Version, possibly a version range. |
Constructor Summary | |
---|---|
ModuleDependency(org.apache.maven.model.Dependency dep)
|
|
ModuleDependency(org.apache.maven.model.Extension ext)
|
|
ModuleDependency(org.apache.maven.project.MavenProject project)
|
|
ModuleDependency(ModuleName name,
String version)
|
|
ModuleDependency(ModuleName name,
String version,
boolean plugin)
|
|
ModuleDependency(org.apache.maven.model.Plugin p)
|
|
ModuleDependency(org.apache.maven.model.ReportPlugin p)
|
|
ModuleDependency(String groupId,
String artifactId,
String version)
|
|
ModuleDependency(String groupId,
String artifactId,
String version,
boolean plugin)
|
Method Summary | |
---|---|
boolean |
contains(ModuleDependency other)
Checks whether this ModuleDependency is satisfied by the dependency of the given ModuleDependency. |
boolean |
equals(Object o)
|
ModuleDependency |
findHighestFrom(Collection<ModuleDependency> candidates)
Given a list of ModuleDependencies (of the same groupId and artifactId), picks the ModuleDependency that satisfies the constraint and has the highest version. |
ModuleName |
getName()
|
org.apache.maven.artifact.versioning.VersionRange |
getVersionAsRange()
|
int |
hashCode()
|
boolean |
isVersionRange()
Returns true if the version specification is a version range per maven version range syntax. |
org.apache.maven.artifact.versioning.ArtifactVersion |
parseVersion()
|
protected Object |
readResolve()
Upon reading from the disk, intern strings. |
String |
toString()
|
ModuleDependency |
withUnknownVersion()
Returns groupId+artifactId plus unknown version. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final String groupId
public final String artifactId
public final String version
public final boolean plugin
public static final String UNKNOWN
public static final String NONE
ModuleDependency
version to become
UNKNOWN
, which would match any builds of the plugin.
So we use this constant to indicate a version, and this will not match anything.
ModuleDependency(Plugin)
,
Constant Field ValuesConstructor Detail |
---|
public ModuleDependency(String groupId, String artifactId, String version)
public ModuleDependency(String groupId, String artifactId, String version, boolean plugin)
public ModuleDependency(ModuleName name, String version)
public ModuleDependency(ModuleName name, String version, boolean plugin)
public ModuleDependency(org.apache.maven.model.Dependency dep)
public ModuleDependency(org.apache.maven.project.MavenProject project)
public ModuleDependency(org.apache.maven.model.Plugin p)
public ModuleDependency(org.apache.maven.model.ReportPlugin p)
public ModuleDependency(org.apache.maven.model.Extension ext)
Method Detail |
---|
public ModuleName getName()
public ModuleDependency withUnknownVersion()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public boolean isVersionRange()
public org.apache.maven.artifact.versioning.VersionRange getVersionAsRange() throws org.apache.maven.artifact.versioning.InvalidVersionSpecificationException
org.apache.maven.artifact.versioning.InvalidVersionSpecificationException
public org.apache.maven.artifact.versioning.ArtifactVersion parseVersion()
protected Object readResolve()
public boolean contains(ModuleDependency other)
other
- The dependency to check for.
public ModuleDependency findHighestFrom(Collection<ModuleDependency> candidates)
ModuleDependency
that satisfies the constraint and has the highest version.
candidates
- List that represents specific (non-range) versions.
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |