JavaScript is disabled on your browser.
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods
void
default void
void
void
copyFile (Path from,
Path to,
boolean filtering,
org.apache.maven.api.Project mavenProject,
List <String > filters,
boolean escapedBackslashesInFilePath,
String encoding,
org.apache.maven.api.Session mavenSession)
Will copy a file with some filtering using defaultFilterWrappers.
void
boolean
Copy and optionally filter a file using separate input and output encodings.
boolean
Copies (or filters) a file and returns whether the destination was actually written.
Method Details
copyFile
void copyFile (Path from,
Path to,
boolean filtering,
org.apache.maven.api.Project mavenProject,
List <String > filters,
boolean escapedBackslashesInFilePath,
String encoding,
org.apache.maven.api.Session mavenSession)
throws MavenFilteringException
Will copy a file with some filtering using defaultFilterWrappers.
Parameters:
from - file to copy/filter
to - destination file
filtering - enable or not filtering
mavenProject - Project
filters - List of String which are path to a Property file
escapedBackslashesInFilePath - escape backslashes in file path.
encoding - The encoding which is used during the filtering process.
mavenSession - Session
Throws:
MavenFilteringException - in case of failure.
See Also:
copyFile
Parameters:
mavenFileFilterRequest - the request
Throws:
MavenFilteringException - in case of failure.
Since:
1.0-beta-3
copyFile
Deprecated.
Parameters:
from - The source file
to - The target file
filtering - true to apply filtering
filterWrappers - List of FileUtils.FilterWrapper
encoding - The encoding used during the filtering.
Throws:
MavenFilteringException - In case of an error.
copyFile
Parameters:
from - The source file
to - The target file
filtering - true to apply filtering
filterWrappers - The filters to be applied.
encoding - The encoding to use
changeDetection - The change detection mode to use to determine if the file should be copied/filtered.
Throws:
MavenFilteringException - In case of an error.
Since:
4.0.0-beta-2
copyFileWithResult
Copies (or filters) a file and returns whether the destination was actually written.
This method is identical to copyFile(Path, Path, boolean, List, String, ChangeDetection)
but returns true when the destination file was created or updated, and false
when the change-detection strategy determined the destination was already up to date and
therefore left untouched. Callers can use this to emit accurate log messages (e.g. "Copying"
vs "Skipping (up to date)").
Parameters:
from - The source file
to - The target file
filtering - true to apply filtering
filterWrappers - The filters to be applied.
encoding - The encoding to use
changeDetection - The change detection mode to use to determine if the file should be copied/filtered.
Returns:
true if the destination was written; false if it was skipped.
Throws:
MavenFilteringException - In case of an error.
Since:
4.0.0-beta-2
copyFile
Parameters:
from - The source file
to - The target file
filtering - true to apply filtering
filterWrappers - List of FileUtils.FilterWrapper
encoding - The encoding used during the filtering.
gracefulBinaryHandling - when true, files that cause
MalformedInputException are copied as-is with a warning
instead of failing the build
Throws:
MavenFilteringException - In case of an error.
Since:
3.4.0
copyFileWithResult
Copy and optionally filter a file using separate input and output encodings. This enables
encoding conversion during resource filtering (e.g. reading ISO-8859-1 and writing UTF-8).
Parameters:
from - The source file
to - The target file
filtering - true to apply filtering
filterWrappers - List of FileUtils.FilterWrapper
inputEncoding - The charset used to read from
outputEncoding - The charset used to write to
changeDetection - The change detection mode to use
Returns:
true if the destination was written; false if it was skipped.
Throws:
MavenFilteringException - In case of an error.
Since:
4.0.0-beta-3
copyFile(Path, Path, boolean, List, String, ChangeDetection)instead