Class PluginUtils
- java.lang.Object
-
- org.apache.maven.tools.plugin.util.PluginUtils
-
public final class PluginUtils extends java.lang.Object
Convenience methods to play with Maven plugins.- Author:
- jdcasey
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.Map<java.lang.String,java.lang.String>
MAVEN_COMPONENTS
Deprecated.wrong approach (fake components), documented parameter default values instead to learn people how to discover them
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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 void
sortMojoParameters(java.util.List<org.apache.maven.plugin.descriptor.Parameter> parameters)
Sorts the specified mojo parameters by name.static void
sortMojos(java.util.List<org.apache.maven.plugin.descriptor.MojoDescriptor> mojoDescriptors)
Sorts the specified mojo descriptors by goal name.
-
-
-
Field Detail
-
MAVEN_COMPONENTS
public static final java.util.Map<java.lang.String,java.lang.String> MAVEN_COMPONENTS
Deprecated.wrong approach (fake components), documented parameter default values instead to learn people how to discover themExpression 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 java.lang.String[] findSources(java.lang.String basedir, java.lang.String include)
- Parameters:
basedir
- not nullinclude
- not null- 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
- not nullinclude
- not nullexclude
- could be null- Returns:
- list of included files
-
sortMojos
public static void sortMojos(java.util.List<org.apache.maven.plugin.descriptor.MojoDescriptor> mojoDescriptors)
Sorts the specified mojo descriptors by goal name.- Parameters:
mojoDescriptors
- The mojo descriptors to sort, may benull
.- See Also:
MojoDescriptor.getGoal()
-
sortMojoParameters
public static void sortMojoParameters(java.util.List<org.apache.maven.plugin.descriptor.Parameter> parameters)
Sorts the specified mojo parameters by name.- Parameters:
parameters
- The mojo parameters to sort, may benull
.- Since:
- 2.4.4
- See Also:
Parameter.getName()
-
-