Package hudson.maven
Class ModuleName
- java.lang.Object
-
- hudson.maven.ModuleName
-
- All Implemented Interfaces:
Serializable
,Comparable<ModuleName>
public class ModuleName extends Object implements Comparable<ModuleName>, Serializable
Version independent name of a Maven project. GroupID+artifactId.- Author:
- Kohsuke Kawaguchi
- See Also:
ModuleDependency
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description String
artifactId
String
groupId
-
Constructor Summary
Constructors Constructor Description ModuleName(String groupId, String artifactId)
ModuleName(org.apache.maven.execution.ExecutionEvent event)
ModuleName(org.apache.maven.model.Dependency dep)
ModuleName(org.apache.maven.model.Extension ext)
ModuleName(org.apache.maven.model.Plugin plugin)
ModuleName(org.apache.maven.model.ReportPlugin plugin)
ModuleName(org.apache.maven.project.MavenProject project)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(ModuleName that)
boolean
equals(Object o)
static ModuleName
fromFileSystemName(String n)
static ModuleName
fromString(String n)
int
hashCode()
static boolean
isValid(String n)
Checks if the given name is valid module name string format created bytoString()
.String
toFileSystemName()
Returns the "groupId$artifactId" form, which is safe for the use as a file name, unliketoString()
.String
toString()
Returns the "groupId:artifactId" form.
-
-
-
Constructor Detail
-
ModuleName
public ModuleName(org.apache.maven.execution.ExecutionEvent event)
-
ModuleName
public ModuleName(org.apache.maven.project.MavenProject project)
-
ModuleName
public ModuleName(org.apache.maven.model.Plugin plugin)
-
ModuleName
public ModuleName(org.apache.maven.model.ReportPlugin plugin)
-
ModuleName
public ModuleName(org.apache.maven.model.Extension ext)
-
ModuleName
public ModuleName(org.apache.maven.model.Dependency dep)
-
-
Method Detail
-
toString
public String toString()
Returns the "groupId:artifactId" form.
-
toFileSystemName
public String toFileSystemName()
Returns the "groupId$artifactId" form, which is safe for the use as a file name, unliketoString()
.
-
fromFileSystemName
public static ModuleName fromFileSystemName(String n)
-
fromString
public static ModuleName fromString(String n)
-
isValid
public static boolean isValid(String n)
Checks if the given name is valid module name string format created bytoString()
.
-
compareTo
public int compareTo(ModuleName that)
- Specified by:
compareTo
in interfaceComparable<ModuleName>
-
-