Package org.codehaus.mojo.license.utils
Class MojoHelper
java.lang.Object
org.codehaus.mojo.license.utils.MojoHelper
Mojo helper methods.
- Since:
- 1.0
- Author:
- tchemit dev@tchemit.fr
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringstatic StringconvertTime(long value) static StringgetArtifactId(org.apache.maven.artifact.Artifact artifact) static StringgetArtifactName(org.apache.maven.project.MavenProject project) static Set<org.apache.maven.artifact.Artifact> getDependencyArtifacts(org.apache.maven.project.MavenProject project) MavenProject.getDependencyArtifacts()is deprecated.static StringgetProjectName(org.apache.maven.project.MavenProject project) static URLsuffix a givenbaseUrlwith the givensuffixstatic Comparator<org.apache.maven.project.MavenProject> static Comparator<org.apache.maven.project.MavenProject>
-
Field Details
-
TIME_FACTORS
protected static final double[] TIME_FACTORS -
TIME_UNITES
-
-
Constructor Details
-
MojoHelper
public MojoHelper()
-
-
Method Details
-
newMavenProjectComparator
-
newMavenProjectComparatorByName
-
convertTime
-
convert
-
getUrl
suffix a givenbaseUrlwith the givensuffix- Parameters:
baseUrl- base url to usesuffix- suffix to add- Returns:
- the new url
-
getArtifactId
-
getArtifactName
-
getProjectName
-
getParams
-
getDependencyArtifacts
public static Set<org.apache.maven.artifact.Artifact> getDependencyArtifacts(org.apache.maven.project.MavenProject project) MavenProject.getDependencyArtifacts()is deprecated.This method checks if the dependency artifacts is
nulland returns an emptyHashSetto avoid theNullPointerExceptions caused by theMavenProject.getDependencyArtifacts()returningnull.- Parameters:
project- the MavenProject to retrieve artifacts from- Returns:
- a HashSet of dependencies or an empty set
-