org.apache.maven.tools.plugin.util
Class PluginUtils

java.lang.Object
  extended by org.apache.maven.tools.plugin.util.PluginUtils

public final class PluginUtils
extends java.lang.Object

Convenience methods to play with Maven plugins.

Version:
$Id: PluginUtils.java 635233 2008-03-09 13:26:54Z vsiveton $
Author:
jdcasey

Method Summary
static void element(org.codehaus.plexus.util.xml.XMLWriter w, java.lang.String name, java.lang.String value)
           
static java.lang.String[] findSources(java.lang.String basedir, java.lang.String include)
           
static java.lang.String[] findSources(java.lang.String basedir, java.lang.String include, java.lang.String exclude)
           
static boolean isMavenReport(java.lang.String impl, org.apache.maven.project.MavenProject project)
           
static java.lang.String makeHtmlValid(java.lang.String description)
           
static java.util.List toComponentDependencies(java.util.List dependencies)
           
static void writeDependencies(org.codehaus.plexus.util.xml.XMLWriter w, org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

findSources

public static java.lang.String[] findSources(java.lang.String basedir,
                                             java.lang.String include)
Parameters:
basedir -
include -
Returns:
list of included files with default SCM excluded files

findSources

public static java.lang.String[] findSources(java.lang.String basedir,
                                             java.lang.String include,
                                             java.lang.String exclude)
Parameters:
basedir -
include -
exclude -
Returns:
list of included files

writeDependencies

public static void writeDependencies(org.codehaus.plexus.util.xml.XMLWriter w,
                                     org.apache.maven.plugin.descriptor.PluginDescriptor pluginDescriptor)
Parameters:
w - not null writer
pluginDescriptor - not null

toComponentDependencies

public static java.util.List toComponentDependencies(java.util.List dependencies)
Parameters:
dependencies - not null list of Dependency
Returns:
list of component dependencies

element

public static void element(org.codehaus.plexus.util.xml.XMLWriter w,
                           java.lang.String name,
                           java.lang.String value)
Parameters:
w - not null writer
name -
value -

isMavenReport

public static boolean isMavenReport(java.lang.String impl,
                                    org.apache.maven.project.MavenProject project)
Parameters:
impl - a Mojo implementation, not null
project - a MavenProject instance, could be null
Returns:
true is the Mojo implementation implements MavenReport, false otherwise.
Throws:
java.lang.IllegalArgumentException - if any

makeHtmlValid

public static java.lang.String makeHtmlValid(java.lang.String description)
Parameters:
description - Javadoc description with HTML tags
Returns:
the description with valid HTML tags


Copyright © 2004-2008 The Apache Software Foundation. All Rights Reserved.