public final class GeneratorUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
discoverPackageName(org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor)
Find the best package name, based on the number of hits of actual Mojo classes.
|
static void |
element(org.codehaus.plexus.util.xml.XMLWriter w,
java.lang.String name,
java.lang.String value) |
static void |
element(org.codehaus.plexus.util.xml.XMLWriter w,
java.lang.String name,
java.lang.String value,
boolean asText) |
static boolean |
isMavenReport(java.lang.String impl,
org.apache.maven.project.MavenProject project) |
static java.lang.String |
makeHtmlValid(java.lang.String description)
Fixes some javadoc comment to become a valid XHTML snippet.
|
static java.util.List<org.codehaus.plexus.component.repository.ComponentDependency> |
toComponentDependencies(java.util.List<org.apache.maven.model.Dependency> dependencies) |
static java.lang.String |
toText(java.lang.String html)
Converts a HTML fragment as extracted from a javadoc comment to a plain text string.
|
static void |
writeDependencies(org.codehaus.plexus.util.xml.XMLWriter w,
org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor) |
public static void writeDependencies(org.codehaus.plexus.util.xml.XMLWriter w, org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor)
w
- not null writerpluginDescriptor
- not nullpublic static void element(org.codehaus.plexus.util.xml.XMLWriter w, java.lang.String name, java.lang.String value)
w
- not null writername
- not nullvalue
- could be nullpublic static void element(org.codehaus.plexus.util.xml.XMLWriter w, java.lang.String name, java.lang.String value, boolean asText)
public static java.util.List<org.codehaus.plexus.component.repository.ComponentDependency> toComponentDependencies(java.util.List<org.apache.maven.model.Dependency> dependencies)
dependencies
- not null list of Dependency
public static java.lang.String makeHtmlValid(java.lang.String description)
description
- Javadoc description with HTML tags, may be null
.null
.public static java.lang.String toText(java.lang.String html)
html
- The HTML fragment to convert to plain text, may be null
.null
.public static java.lang.String discoverPackageName(org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor)
pluginDescriptor
- not nullpublic static boolean isMavenReport(java.lang.String impl, org.apache.maven.project.MavenProject project) throws java.lang.IllegalArgumentException
impl
- a Mojo implementation, not nullproject
- a MavenProject instance, could be nulltrue
is the Mojo implementation implements MavenReport
,
false
otherwise.java.lang.IllegalArgumentException
- if any