Class PreprocessorClearMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
com.igormaznitsa.jcp.maven.PreprocessorClearMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="clear", defaultPhase=PACKAGE, threadSafe=true, requiresProject=true) public class PreprocessorClearMojo extends org.apache.maven.plugin.AbstractMojo
The Mojo allows to delete preprocessed folders.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private List<org.apache.maven.shared.model.fileset.FileSet>
    List of folders and files to be removed, every folder defined as a FileSet and can contain exclude and include lists.
    private File
    The Destination folder where generated sources can be placed in non-test mode and which will be removed.
    private File
    Destination folder where generated sources can be placed in test-mode and which will be removed.

    Fields inherited from interface org.apache.maven.plugin.Mojo

    ROLE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    private void
    processFileSet(List<org.apache.maven.shared.model.fileset.FileSet> fileSets, org.slf4j.Logger log)
     
    private void
    processPredefinedFolders(org.slf4j.Logger log)
     

    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
  • Field Details

    • preprocessedSources

      @Parameter(alias="preprocessedSources", readonly=true, defaultValue="${project.build.directory}/generated-sources/preprocessed") private File preprocessedSources
      The Destination folder where generated sources can be placed in non-test mode and which will be removed.
    • preprocessedTestSources

      @Parameter(alias="preprocessedTestSources", readonly=true, defaultValue="${project.build.directory}/generated-test-sources/preprocessed") private File preprocessedTestSources
      Destination folder where generated sources can be placed in test-mode and which will be removed.
    • fileSets

      @Parameter(alias="fileSets", required=false) private List<org.apache.maven.shared.model.fileset.FileSet> fileSets
      List of folders and files to be removed, every folder defined as a FileSet and can contain exclude and include lists.
        <fileSets>
          <fileSet>
            <directory>${basedir}/someFolder</directory>
            <includes>
              <include>*.txt</include>
            </includes>
          </fileSet>
        </fileSets>
       
      See Also:
  • Constructor Details

    • PreprocessorClearMojo

      public PreprocessorClearMojo()
  • Method Details

    • processPredefinedFolders

      private void processPredefinedFolders(org.slf4j.Logger log) throws org.apache.maven.plugin.MojoFailureException
      Throws:
      org.apache.maven.plugin.MojoFailureException
    • execute

      public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
      org.apache.maven.plugin.MojoFailureException
    • processFileSet

      private void processFileSet(@MustNotContainNull List<org.apache.maven.shared.model.fileset.FileSet> fileSets, org.slf4j.Logger log) throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException