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)
-
Field Summary
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidLog a debug messagevoidLog an error messagevoidexecute()booleanbooleanFile[]booleangetClear()booleanbooleanString[]booleanbooleanbooleanbooleanbooleanbooleanbooleanvoidLog an information messagebooleanbooleanbooleanisSkip()voidsetAllowWhitespace(boolean flag) voidsetCareForLastNextLine(boolean flag) voidsetCfgFiles(File[] files) voidsetClear(boolean flag) voidsetCompareDestination(boolean flag) voidsetCopyFileAttributes(boolean flag) voidsetDestination(File destination) voidsetDisableOut(boolean value) voidsetExcluded(String excluded) voidsetExcludedFolders(String... antPatterns) voidsetGlobalVars(Properties vars) voidsetIgnoreMissingSources(boolean flag) voidsetInEncoding(String value) voidsetKeepLines(boolean keepLines) voidsetKeepSrcRoot(boolean flag) voidsetOutEncoding(String value) voidsetPreserveIndent(boolean flag) voidsetProcessing(String processing) voidsetRemoveComments(boolean value) voidsetSkip(boolean flag) voidvoidsetTestDestination(File destination) voidsetUnknownVarAsFalse(boolean flag) voidsetUseTestSources(boolean flag) voidsetVerbose(boolean verbose) voidLog a warning messageMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Constructor Details
-
PreprocessorMojo
public PreprocessorMojo()
-
-
Method Details
-
setExcludedFolders
-
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
-
getGlobalVars
-
setCfgFiles
-
getCfgFiles
-
setCompareDestination
public void setCompareDestination(boolean flag) -
isCompareDestination
public boolean isCompareDestination() -
setSource
-
getSource
-
setDestination
-
getDestination
-
setTestDestination
-
getTestDestination
-
setInEncoding
-
getInEncoding
-
setOutEncoding
-
getOutEncoding
-
setExcluded
-
getExcluded
-
setUnknownVarAsFalse
public void setUnknownVarAsFalse(boolean flag) -
getUnknownVarAsFalse
public boolean getUnknownVarAsFalse() -
setProcessing
-
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:
executein interfaceorg.apache.maven.plugin.Mojo- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
error
Description copied from interface:PreprocessorLoggerLog an error message- Specified by:
errorin interfacePreprocessorLogger- Parameters:
message- the text to be output into the error log
-
info
Description copied from interface:PreprocessorLoggerLog an information message- Specified by:
infoin interfacePreprocessorLogger- Parameters:
message- the text to be output into the information log
-
warning
Description copied from interface:PreprocessorLoggerLog a warning message- Specified by:
warningin interfacePreprocessorLogger- Parameters:
message- the text to be output into the warning log
-
debug
Description copied from interface:PreprocessorLoggerLog a debug message- Specified by:
debugin interfacePreprocessorLogger- Parameters:
message- the text to be output into the information log
-