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 Object

Convenience methods to play with Maven plugins.

Version:
$Id: PluginUtils.java 1405318 2012-11-03 10:57:36Z hboutemy $
Author:
jdcasey

Field Summary
static Map<String,String> MAVEN_COMPONENTS
          Expression associated with class types to recognize Maven objects (injected in fact as parameters by maven-core's PluginParameterExpressionEvaluator) like components ("real" components are injected by Plexus).
 
Method Summary
static String[] findSources(String basedir, String include)
           
static String[] findSources(String basedir, String include, String exclude)
           
static void sortMojoParameters(List<Parameter> parameters)
          Sorts the specified mojo parameters by name.
static void sortMojos(List<MojoDescriptor> mojoDescriptors)
          Sorts the specified mojo descriptors by goal name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAVEN_COMPONENTS

public static final Map<String,String> MAVEN_COMPONENTS
Expression associated with class types to recognize Maven objects (injected in fact as parameters by maven-core's PluginParameterExpressionEvaluator) like components ("real" components are injected by Plexus).

Method Detail

findSources

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

findSources

public static String[] findSources(String basedir,
                                   String include,
                                   String exclude)
Parameters:
basedir - not null
include - not null
exclude - could be null
Returns:
list of included files

sortMojos

public static void sortMojos(List<MojoDescriptor> mojoDescriptors)
Sorts the specified mojo descriptors by goal name.

Parameters:
mojoDescriptors - The mojo descriptors to sort, may be null.
See Also:
MojoDescriptor.getGoal()

sortMojoParameters

public static void sortMojoParameters(List<Parameter> parameters)
Sorts the specified mojo parameters by name.

Parameters:
parameters - The mojo parameters to sort, may be null.
Since:
2.4.4
See Also:
Parameter.getName()


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