Package org.codehaus.mojo.templating
Class AbstractFilterSourcesMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.codehaus.mojo.templating.AbstractFilterSourcesMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
FilterSourcesMojo,FilterTestSourcesMojo
public abstract class AbstractFilterSourcesMojo extends org.apache.maven.plugin.AbstractMojoThe base class forFilterSourcesMojoandFilterTestSourcesMojo
-
-
Field Summary
Fields Modifier and Type Field Description protected List<String>delimitersSet of delimiters for expressions to filter within the resources.protected StringescapeStringExpression preceded with the String won't be interpolated \${foo} will be replaced with ${foo}protected org.apache.maven.shared.filtering.MavenResourcesFilteringmavenResourcesFilteringThe resources filtering which is used.protected booleanoverwriteControls whether to overwrite files that are not changed, by default files will not be overwrittenprotected booleanskipPomsSkips POM projects if set to true, which is the default option.protected booleanuseDefaultDelimitersControls whether the default delimiters are included in addition to those configureddelimiters.
-
Constructor Summary
Constructors Constructor Description AbstractFilterSourcesMojo()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidaddSourceFolderToProject(org.apache.maven.project.MavenProject mavenProject)protected intcountCopiedFiles()voidexecute()protected abstract FilegetOutputDirectory()protected abstract FilegetSourceDirectory()
-
-
-
Field Detail
-
escapeString
@Parameter(property="maven.resources.escapeString") protected String escapeString
Expression preceded with the String won't be interpolated \${foo} will be replaced with ${foo}
-
delimiters
@Parameter protected List<String> delimiters
Set of delimiters for expressions to filter within the resources. These delimiters are specified in the form 'beginToken*endToken'. If no '*' is given, the delimiter is assumed to be the same for start and end. So, the default filtering delimiters might be specified as:<delimiters> <delimiter>${*}</delimiter> <delimiter>@</delimiter> </delimiters>Since the '@' delimiter is the same on both ends, we don't need to specify '@*@' (though we can).
-
useDefaultDelimiters
@Parameter(defaultValue="true") protected boolean useDefaultDelimiters
Controls whether the default delimiters are included in addition to those configureddelimiters. Does not have any effect ifdelimitersis empty when the defaults will be included anyway.
-
overwrite
@Parameter(defaultValue="false") protected boolean overwrite
Controls whether to overwrite files that are not changed, by default files will not be overwritten
-
skipPoms
@Parameter(defaultValue="true") protected boolean skipPoms
Skips POM projects if set to true, which is the default option.
-
mavenResourcesFiltering
@Component(hint="default") protected org.apache.maven.shared.filtering.MavenResourcesFiltering mavenResourcesFiltering
The resources filtering which is used.
-
-
Method Detail
-
getSourceDirectory
protected abstract File getSourceDirectory()
- Returns:
- The location of the source directory.
-
getOutputDirectory
protected abstract File getOutputDirectory()
- Returns:
- The location of the output directory.
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
countCopiedFiles
protected int countCopiedFiles()
- Returns:
- number of copied files.
-
addSourceFolderToProject
protected abstract void addSourceFolderToProject(org.apache.maven.project.MavenProject mavenProject)
- Parameters:
mavenProject-MavenProject
-
-