org.codehaus.mojo.license
Class MojoHelper
java.lang.Object
org.codehaus.mojo.license.MojoHelper
public class MojoHelper
- extends Object
Mojo helper methods.
- Since:
- 1.0
- Author:
- tchemit
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
timeFactors
protected static final double[] timeFactors
timeUnites
protected static final String[] timeUnites
MojoHelper
public MojoHelper()
addResourceDir
public static boolean addResourceDir(File dir,
org.apache.maven.project.MavenProject project,
String... includes)
- Add the directory as a resource of the given project.
- Parameters:
dir
- the directory to addproject
- the project to updateincludes
- the includes of the resource
- Returns:
true
if the resources was added (not already existing)
addResourceDir
public static boolean addResourceDir(File dir,
org.apache.maven.project.MavenProject project,
List<?> resources,
String... includes)
- Add the directory as a resource in the given resource list.
- Parameters:
dir
- the directory to addproject
- the project involvedresources
- the list of existing resourcesincludes
- includes of the new resources
- Returns:
true
if the resource was added (not already existing)
newMavenProjectComparator
public static Comparator<org.apache.maven.project.MavenProject> newMavenProjectComparator()
convertTime
public static String convertTime(long value)
convert
public static String convert(long value,
double[] factors,
String[] unites)
getUrl
public static URL getUrl(URL baseUrl,
String suffix)
throws IllegalArgumentException
- suffix a given
baseUrl
with the given suffix
- Parameters:
baseUrl
- base url to usesuffix
- suffix to add
- Returns:
- the new url
- Throws:
IllegalArgumentException
- if malformed url.
getArtifactId
public static String getArtifactId(org.apache.maven.artifact.Artifact artifact)
getArtifactName
public static String getArtifactName(org.apache.maven.project.MavenProject project)
Copyright © 2010-2013 The Kuali Foundation. All Rights Reserved.