Package org.codehaus.mojo.templating
Class FilterTestSourcesMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.codehaus.mojo.templating.AbstractFilterSourcesMojo
-
- org.codehaus.mojo.templating.FilterTestSourcesMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="filter-test-sources", defaultPhase=GENERATE_TEST_SOURCES, threadSafe=true) public class FilterTestSourcesMojo extends AbstractFilterSourcesMojoThis mojo helps adding a filtered source folder in one go. This is typically useful if you want to use properties coming from the POM inside parts of your test source code that requires real constants, like annotations for example.
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.FiletestOutputDirectoryOutput folder where filtered test sources will land.private java.io.FiletestSourceDirectorySource directory that will be first filtered and then added as a classical source folder.-
Fields inherited from class org.codehaus.mojo.templating.AbstractFilterSourcesMojo
delimiters, escapeString, mavenResourcesFiltering, overwrite, skipPoms, useDefaultDelimiters
-
-
Constructor Summary
Constructors Constructor Description FilterTestSourcesMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddSourceFolderToProject(org.apache.maven.project.MavenProject mavenProject)protected java.io.FilegetOutputDirectory()protected java.io.FilegetSourceDirectory()-
Methods inherited from class org.codehaus.mojo.templating.AbstractFilterSourcesMojo
countCopiedFiles, execute
-
-
-
-
Field Detail
-
testSourceDirectory
@Parameter(defaultValue="${basedir}/src/test/java-templates") private java.io.File testSourceDirectorySource directory that will be first filtered and then added as a classical source folder.
-
testOutputDirectory
@Parameter(defaultValue="${project.build.directory}/generated-test-sources/java-templates") private java.io.File testOutputDirectoryOutput folder where filtered test sources will land.
-
-
Method Detail
-
getSourceDirectory
protected java.io.File getSourceDirectory()
- Specified by:
getSourceDirectoryin classAbstractFilterSourcesMojo- Returns:
- The location of the source directory.
-
getOutputDirectory
protected java.io.File getOutputDirectory()
- Specified by:
getOutputDirectoryin classAbstractFilterSourcesMojo- Returns:
- The location of the output directory.
-
addSourceFolderToProject
protected void addSourceFolderToProject(org.apache.maven.project.MavenProject mavenProject)
- Specified by:
addSourceFolderToProjectin classAbstractFilterSourcesMojo- Parameters:
mavenProject-MavenProject
-
-