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 String
The 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.MavenProject
The Maven Project Object.List of resource dirs.protected org.apache.maven.execution.MavenSession
The maven session.protected Boolean
Skips processing.
Defaults to true if packaging is "pom".protected String
The verbosity.
One of "default", "info" or "debug".protected Verbosity
mapped verbosity levelFields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Properties
Creates the extra properties.protected void
Determines the charset.protected void
sets the verbosityprotected void
exportExtraProperties
(Properties props) Make extra properties available.protected void
Finds all resource directories.protected String
Gets the path relative to the basedir.
Parent dirs of the basedir will also be tried.protected String
getResourceDirName
(String dirName) Checks if given directory resides in resources.protected boolean
Returns whether the execution should be skipped.Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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
-