| Modifier and Type | Field and Description |
|---|---|
protected ClosureConfig |
closureConfig |
protected List<File> |
files |
protected boolean |
includesEmpty |
protected MojoMetadata |
mojoMeta |
protected FilenameInterpolator |
outputFilenameInterpolator |
protected FileProcessConfig |
processConfig |
protected File |
sourceDir |
protected File |
targetDir |
static String |
TEMP_SUFFIX |
| Constructor and Description |
|---|
ProcessFilesTask(MojoMetadata mojoMeta,
FileProcessConfig processConfig,
FileSpecifier fileSpecifier,
ClosureConfig closureConfig)
Task constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
call()
Method executed by the thread.
|
protected boolean |
copy(File sourceFile,
File targetFile)
Copies sourceFile to targetFile, making sure to inform the build context of the change.
|
protected boolean |
haveFilesChanged(Collection<File> sourceFiles,
Collection<File> outputFiles) |
protected void |
logCompressionGains(List<File> srcFiles,
String minified)
Logs compression gains.
|
protected void |
merge(File mergedFile)
Merges a list of source files.
|
protected void |
mkDir(File directory)
Creates the given directory (and parents) and informs the build context.
|
protected void |
removeMessages(Collection<File> files) |
public static final String TEMP_SUFFIX
protected final MojoMetadata mojoMeta
protected final ClosureConfig closureConfig
protected final boolean includesEmpty
protected final FilenameInterpolator outputFilenameInterpolator
protected final FileProcessConfig processConfig
protected final File sourceDir
protected final File targetDir
public ProcessFilesTask(MojoMetadata mojoMeta, FileProcessConfig processConfig, FileSpecifier fileSpecifier, ClosureConfig closureConfig) throws IOException
mojoMeta - Base mojo data.bufferSize - size of the buffer used to read source filesforce - Whether the check for changed files is skipped.skipMerge - whether to skip the merge step or notskipMinify - whether to skip the minify step or notfileSpecifier - Details about the input / output files.closureConfig - Google closure configurationIOExceptionpublic Object call() throws IOException, org.apache.maven.plugin.MojoFailureException
call in interface Callable<Object>IOException - when the merge or minify steps failorg.apache.maven.plugin.MojoFailureExceptionprotected void removeMessages(Collection<File> files)
protected void logCompressionGains(List<File> srcFiles, String minified)
srcFiles - list of input files to compressminifiedFile - output file resulting from the minify stepprotected void mkDir(File directory)
directory - protected boolean copy(File sourceFile, File targetFile) throws IOException
sourceFile - targetFile - true if execution was performed, false if it was skipped (because files did not
change).IOExceptionprotected void merge(File mergedFile) throws IOException
mergedFile - output file resulting from the merged stepIOException - when the merge step failsprotected boolean haveFilesChanged(Collection<File> sourceFiles, Collection<File> outputFiles)
sourceFiles - outputFiles - Copyright © 2009–2018 Andre Wachsmuth. All rights reserved.