hudson.maven
Class ModuleDependency

java.lang.Object
  extended by hudson.maven.ModuleDependency
All Implemented Interfaces:
Serializable

public final class ModuleDependency
extends Object
implements Serializable

group id + artifact id + version and a flag to know if it's a plugin

Author:
Kohsuke Kawaguchi
See Also:
ModuleName, Serialized Form

Field 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
           
 
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(org.apache.maven.model.Plugin p)
           
ModuleDependency(org.apache.maven.model.ReportPlugin p)
           
ModuleDependency(String groupId, String artifactId, String version)
           
 
Method Summary
 boolean equals(Object o)
           
 ModuleName getName()
           
 int hashCode()
           
 ModuleDependency readResolve()
          Upon reading from the disk, intern strings.
 ModuleDependency withUnknownVersion()
          Returns groupId+artifactId plus unknown version.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

groupId

public final String groupId

artifactId

public final String artifactId

version

public final String version

plugin

public boolean plugin
Since:
1.395

UNKNOWN

public static final String UNKNOWN
For compatibility reason, this value may be used in the verion field to indicate that the version is unknown.

See Also:
Constant Field Values

NONE

public static final String NONE
When a plugin dependency is specified without giving a version, the semantics of that is the latest released plugin. In this case, we don't want the 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.

See Also:
ModuleDependency(Plugin), Constant Field Values
Constructor Detail

ModuleDependency

public ModuleDependency(String groupId,
                        String artifactId,
                        String version)

ModuleDependency

public ModuleDependency(ModuleName name,
                        String version)

ModuleDependency

public ModuleDependency(org.apache.maven.model.Dependency dep)

ModuleDependency

public ModuleDependency(org.apache.maven.project.MavenProject project)

ModuleDependency

public ModuleDependency(org.apache.maven.model.Plugin p)

ModuleDependency

public ModuleDependency(org.apache.maven.model.ReportPlugin p)

ModuleDependency

public ModuleDependency(org.apache.maven.model.Extension ext)
Method Detail

getName

public ModuleName getName()

withUnknownVersion

public ModuleDependency withUnknownVersion()
Returns groupId+artifactId plus unknown version.


equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

readResolve

public ModuleDependency readResolve()
Upon reading from the disk, intern strings.



Copyright © 2004-2011. All Rights Reserved.