Package org.wurbelizer.maven
Class AbstractWurbelizerMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.wurbelizer.maven.AbstractWurbelizerMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
AbstractWurbelMojo,WurbileMojo
public abstract class AbstractWurbelizerMojo
extends org.apache.maven.plugin.AbstractMojo
Base class of wurbelizer mojos.
- Author:
- harald
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringThe charset used to read and write files.protected List<org.apache.maven.shared.model.fileset.FileSet> The list of file sets to wurbile.
If set the source directory is ignored.protected org.apache.maven.project.MavenProjectThe Maven Project Object.List of resource dirs.protected org.apache.maven.execution.MavenSessionThe maven session.protected BooleanSkips processing.
Defaults to true if packaging is "pom".protected StringThe verbosity.
One of "default", "info" or "debug".protected Verbositymapped verbosity levelFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected PropertiesCreates the extra properties.protected voidDetermines the charset.protected voidsets the verbosityprotected voidexportExtraProperties(Properties props) Make extra properties available.protected voidFinds all resource directories.protected StringGets the path relative to the basedir.
Parent dirs of the basedir will also be tried.protected StringgetResourceDirName(String dirName) Checks if given directory resides in resources.protected booleanReturns whether the execution should be skipped.Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.maven.plugin.Mojo
execute
-
Field Details
-
project
@Parameter(defaultValue="${project}", required=true, readonly=true) protected org.apache.maven.project.MavenProject projectThe Maven Project Object. -
session
@Parameter(defaultValue="${session}", required=true, readonly=true) protected org.apache.maven.execution.MavenSession sessionThe maven session. -
filesets
The list of file sets to wurbile.
If set the source directory is ignored. -
verbosity
The verbosity.
One of "default", "info" or "debug". Debus is also turned on (if not set explicitly) by Maven's global debug flag (see command line switch-X). -
charset
The charset used to read and write files. -
skip
Skips processing.
Defaults to true if packaging is "pom". -
verbosityLevel
mapped verbosity level -
resourceDirs
List of resource dirs.
-
-
Constructor Details
-
AbstractWurbelizerMojo
public AbstractWurbelizerMojo()
-
-
Method Details
-
determineEncoding
protected void determineEncoding()Determines the charset. -
determineVerbosity
protected void determineVerbosity()sets the verbosity -
getPathRelativeToBasedir
Gets the path relative to the basedir.
Parent dirs of the basedir will also be tried.- Parameters:
path- the absolute path- Returns:
- the shortened path
-
findResourceDirs
protected void findResourceDirs()Finds all resource directories. -
getResourceDirName
Checks if given directory resides in resources.- Parameters:
dirName- the directory name- Returns:
- the resource dir, null if not a resource
-
createExtraProperties
Creates the extra properties.- Returns:
- the properties
-
exportExtraProperties
Make extra properties available.- Parameters:
props- the properties
-
isSkipped
protected boolean isSkipped()Returns whether the execution should be skipped.- Returns:
- true to do nothing
-