public final class PluginUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
element(org.codehaus.plexus.util.xml.XMLWriter w,
String name,
String value) |
static String[] |
findSources(String basedir,
String include) |
static String[] |
findSources(String basedir,
String include,
String exclude) |
static boolean |
isMavenReport(String impl,
org.apache.maven.project.MavenProject project) |
static String |
makeHtmlValid(String description)
Fixes some javadoc comment to become a valid XHTML snippet.
|
static void |
sortMojoParameters(List parameters)
Sorts the specified mojo parameters by name.
|
static void |
sortMojos(List mojoDescriptors)
Sorts the specified mojo descriptors by goal name.
|
static List |
toComponentDependencies(List dependencies) |
static String |
toText(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 String[] findSources(String basedir, String include)
basedir - not nullinclude - not nullpublic static String[] findSources(String basedir, String include, String exclude)
basedir - not nullinclude - not nullexclude - could be nullpublic static void writeDependencies(org.codehaus.plexus.util.xml.XMLWriter w,
org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor)
w - not null writerpluginDescriptor - not nullpublic static List toComponentDependencies(List dependencies)
dependencies - not null list of Dependencypublic static void element(org.codehaus.plexus.util.xml.XMLWriter w,
String name,
String value)
w - not null writername - not nullvalue - could be nullpublic static boolean isMavenReport(String impl, org.apache.maven.project.MavenProject project) throws IllegalArgumentException
impl - a Mojo implementation, not nullproject - a MavenProject instance, could be nulltrue is the Mojo implementation implements MavenReport,
false otherwise.IllegalArgumentException - if anypublic static String makeHtmlValid(String description)
description - Javadoc description with HTML tags, may be null.null.public static void sortMojos(List mojoDescriptors)
mojoDescriptors - The mojo descriptors to sort, may be null.MojoDescriptor.getGoal()public static void sortMojoParameters(List parameters)
parameters - The mojo parameters to sort, may be null.Parameter.getName()public static String toText(String html)
html - The HTML fragment to convert to plain text, may be null.null.Copyright © 2004-2012 Apache Software Foundation. All Rights Reserved.