Class GeneratorUtils
java.lang.Object
org.apache.maven.tools.plugin.generator.GeneratorUtils
Convenience methods to play with Maven plugins.
- Author:
- jdcasey
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringdiscoverPackageName(org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor) Find the best package name, based on the number of hits of actual Mojo classes.static voidstatic booleanisMavenReport(String impl, org.apache.maven.project.MavenProject project) Deprecated.static List<org.codehaus.plexus.component.repository.ComponentDependency> toComponentDependencies(Collection<org.apache.maven.artifact.Artifact> artifacts) static voidwriteDependencies(org.codehaus.plexus.util.xml.XMLWriter w, org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor)
-
Method Details
-
writeDependencies
public static void writeDependencies(org.codehaus.plexus.util.xml.XMLWriter w, org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor) - Parameters:
w- not null writerpluginDescriptor- not null
-
element
-
toComponentDependencies
public static List<org.codehaus.plexus.component.repository.ComponentDependency> toComponentDependencies(Collection<org.apache.maven.artifact.Artifact> artifacts) - Parameters:
artifacts- not null collection ofArtifact- Returns:
- list of component dependencies, without in provided scope
-
discoverPackageName
public static String discoverPackageName(org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor) Find the best package name, based on the number of hits of actual Mojo classes.- Parameters:
pluginDescriptor- not null- Returns:
- the best name of the package for the generated mojo
-
isMavenReport
@Deprecated public static boolean isMavenReport(String impl, org.apache.maven.project.MavenProject project) throws IllegalArgumentException Deprecated.UsePluginUtils.isMavenReport(String, MavenProject)instead.- Parameters:
impl- a Mojo implementation, not nullproject- a MavenProject instance, could be null- Returns:
trueis the Mojo implementation implementsMavenReport,falseotherwise.- Throws:
IllegalArgumentException- if any
-
PluginUtils.isMavenReport(String, MavenProject)instead.