Class PreprocessorMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
com.igormaznitsa.jcp.maven.PreprocessorMojo
All Implemented Interfaces:
PreprocessorLogger, org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
PreprocessTestsMojo

@Mojo(name="preprocess", defaultPhase=GENERATE_SOURCES, threadSafe=true, requiresProject=true) public class PreprocessorMojo extends org.apache.maven.plugin.AbstractMojo implements PreprocessorLogger
The Mojo makes preprocessing of defined or project root source folders and place result in defined or predefined folder, also it can replace the source folder for a maven project to use the preprocessed sources.
Author:
Igor Maznitsa (igor.maznitsa@igormaznitsa.com)
  • Constructor Details

    • PreprocessorMojo

      public PreprocessorMojo()
  • Method Details

    • setExcludedFolders

      public void setExcludedFolders(@MustNotContainNull String... antPatterns)
    • getExcludedFolders

      @MustNotContainNull public String[] getExcludedFolders()
    • setIgnoreMissingSources

      public void setIgnoreMissingSources(boolean flag)
    • isIgnoreMissingSources

      public boolean isIgnoreMissingSources()
    • setSkip

      public void setSkip(boolean flag)
    • isSkip

      public boolean isSkip()
    • setPreserveIndent

      public void setPreserveIndent(boolean flag)
    • getPreserveIndent

      public boolean getPreserveIndent()
    • setCopyFileAttributes

      public void setCopyFileAttributes(boolean flag)
    • getCopyFileAttributes

      public boolean getCopyFileAttributes()
    • setUseTestSources

      public void setUseTestSources(boolean flag)
    • getUseTestSources

      public boolean getUseTestSources()
    • setClear

      public void setClear(boolean flag)
    • getClear

      public boolean getClear()
    • setCareForLastNextLine

      public void setCareForLastNextLine(boolean flag)
    • getCarForLastNextLine

      public boolean getCarForLastNextLine()
    • setKeepSrcRoot

      public void setKeepSrcRoot(boolean flag)
    • getKeepSrcRoot

      public boolean getKeepSrcRoot()
    • setGlobalVars

      public void setGlobalVars(Properties vars)
    • getGlobalVars

      public Properties getGlobalVars()
    • setCfgFiles

      public void setCfgFiles(@MustNotContainNull File[] files)
    • getCfgFiles

      @MustNotContainNull public File[] getCfgFiles()
    • setCompareDestination

      public void setCompareDestination(boolean flag)
    • isCompareDestination

      public boolean isCompareDestination()
    • setSource

      public void setSource(String source)
    • getSource

      public String getSource()
    • setDestination

      public void setDestination(File destination)
    • getDestination

      public File getDestination()
    • setTestDestination

      public void setTestDestination(File destination)
    • getTestDestination

      public File getTestDestination()
    • setInEncoding

      public void setInEncoding(String value)
    • getInEncoding

      public String getInEncoding()
    • setOutEncoding

      public void setOutEncoding(String value)
    • getOutEncoding

      public String getOutEncoding()
    • setExcluded

      public void setExcluded(String excluded)
    • getExcluded

      public String getExcluded()
    • setUnknownVarAsFalse

      public void setUnknownVarAsFalse(boolean flag)
    • getUnknownVarAsFalse

      public boolean getUnknownVarAsFalse()
    • setProcessing

      public void setProcessing(String processing)
    • getProcessing

      public String getProcessing()
    • setDisableOut

      public void setDisableOut(boolean value)
    • getDisableOut

      public boolean getDisableOut()
    • setVerbose

      public void setVerbose(boolean verbose)
    • getVerbose

      public boolean getVerbose()
    • setKeepLines

      public void setKeepLines(boolean keepLines)
    • getKeepLines

      public boolean getKeepLines()
    • setAllowWhitespace

      public void setAllowWhitespace(boolean flag)
    • getAllowWhitespace

      public boolean getAllowWhitespace()
    • setRemoveComments

      public void setRemoveComments(boolean value)
    • getRemoveComments

      public boolean getRemoveComments()
    • execute

      public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
      Specified by:
      execute in interface org.apache.maven.plugin.Mojo
      Throws:
      org.apache.maven.plugin.MojoExecutionException
      org.apache.maven.plugin.MojoFailureException
    • error

      public void error(String message)
      Description copied from interface: PreprocessorLogger
      Log an error message
      Specified by:
      error in interface PreprocessorLogger
      Parameters:
      message - the text to be output into the error log
    • info

      public void info(String message)
      Description copied from interface: PreprocessorLogger
      Log an information message
      Specified by:
      info in interface PreprocessorLogger
      Parameters:
      message - the text to be output into the information log
    • warning

      public void warning(String message)
      Description copied from interface: PreprocessorLogger
      Log a warning message
      Specified by:
      warning in interface PreprocessorLogger
      Parameters:
      message - the text to be output into the warning log
    • debug

      public void debug(String message)
      Description copied from interface: PreprocessorLogger
      Log a debug message
      Specified by:
      debug in interface PreprocessorLogger
      Parameters:
      message - the text to be output into the information log