Class DefaultMavenFileFilter
- java.lang.Object
-
- org.apache.maven.shared.filtering.DefaultMavenFileFilter
-
- All Implemented Interfaces:
DefaultFilterInfo,MavenFileFilter
@Singleton @Named public class DefaultMavenFileFilter extends Object implements MavenFileFilter
- Author:
- Olivier Lamy
-
-
Constructor Summary
Constructors Constructor Description DefaultMavenFileFilter(org.sonatype.plexus.build.incremental.BuildContext buildContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidcopyFile(File from, File to, boolean filtering, List<FilterWrapper> filterWrappers, String encoding)voidcopyFile(File from, File to, boolean filtering, List<FilterWrapper> filterWrappers, String encoding, boolean overwrite)Deprecated.voidcopyFile(File from, File to, boolean filtering, org.apache.maven.project.MavenProject mavenProject, List<String> filters, boolean escapedBackslashesInFilePath, String encoding, org.apache.maven.execution.MavenSession mavenSession)Will copy a file with some filtering using defaultFilterWrappers.voidcopyFile(MavenFileFilterRequest mavenFileFilterRequest)List<FilterWrapper>getDefaultFilterWrappers(org.apache.maven.project.MavenProject mavenProject, List<String> filters, boolean escapedBackslashesInFilePath, org.apache.maven.execution.MavenSession mavenSession, MavenResourcesExecution mavenResourcesExecution)List<FilterWrapper>getDefaultFilterWrappers(AbstractMavenFilteringRequest request)protected org.slf4j.LoggergetLogger()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.maven.shared.filtering.DefaultFilterInfo
getDefaultFilterWrappers, getDefaultFilterWrappers
-
-
-
-
Method Detail
-
copyFile
public void copyFile(File from, File to, boolean filtering, org.apache.maven.project.MavenProject mavenProject, List<String> filters, boolean escapedBackslashesInFilePath, String encoding, org.apache.maven.execution.MavenSession mavenSession) throws MavenFilteringException
Description copied from interface:MavenFileFilterWill copy a file with some filtering using defaultFilterWrappers.- Specified by:
copyFilein interfaceMavenFileFilter- Parameters:
from- file to copy/filterto- destination filefiltering- enable or not filteringmavenProject-MavenProjectfilters-Listof String which are path to a Property fileescapedBackslashesInFilePath- escape backslashes in file path.encoding- The encoding which is used during the filtering process.mavenSession-MavenSession- Throws:
MavenFilteringException- in case of failure.- See Also:
DefaultFilterInfo.getDefaultFilterWrappers(MavenProject, List, boolean,MavenSession, MavenResourcesExecution)
-
copyFile
public void copyFile(MavenFileFilterRequest mavenFileFilterRequest) throws MavenFilteringException
- Specified by:
copyFilein interfaceMavenFileFilter- Parameters:
mavenFileFilterRequest- the request- Throws:
MavenFilteringException- in case of failure.
-
copyFile
public void copyFile(File from, File to, boolean filtering, List<FilterWrapper> filterWrappers, String encoding) throws MavenFilteringException
- Specified by:
copyFilein interfaceMavenFileFilter- Parameters:
from- The source fileto- The target filefiltering- true to apply filteringfilterWrappers-Listof FileUtils.FilterWrapperencoding- The encoding used during the filtering.- Throws:
MavenFilteringException- In case of an error.
-
copyFile
@Deprecated public void copyFile(File from, File to, boolean filtering, List<FilterWrapper> filterWrappers, String encoding, boolean overwrite) throws MavenFilteringException
Deprecated.- Specified by:
copyFilein interfaceMavenFileFilter- Parameters:
from- The source fileto- The destination filefiltering- true to apply filteringfilterWrappers- The filters to be applied.encoding- The encoding to useoverwrite- unused- Throws:
MavenFilteringException- In case of an error.
-
getLogger
protected org.slf4j.Logger getLogger()
-
getDefaultFilterWrappers
public List<FilterWrapper> getDefaultFilterWrappers(org.apache.maven.project.MavenProject mavenProject, List<String> filters, boolean escapedBackslashesInFilePath, org.apache.maven.execution.MavenSession mavenSession, MavenResourcesExecution mavenResourcesExecution) throws MavenFilteringException
- Specified by:
getDefaultFilterWrappersin interfaceDefaultFilterInfo- Parameters:
mavenProject- The maven projectfilters- The filters to getescapedBackslashesInFilePath- escape backslashes ?mavenSession- The maven sessionmavenResourcesExecution- The filtering configuration- Returns:
Listof FileUtils.FilterWrapper- Throws:
MavenFilteringException- in case of failure.
-
getDefaultFilterWrappers
public List<FilterWrapper> getDefaultFilterWrappers(AbstractMavenFilteringRequest request) throws MavenFilteringException
- Specified by:
getDefaultFilterWrappersin interfaceDefaultFilterInfo- Parameters:
request- The filtering request- Returns:
Listof FileUtils.FilterWrapper- Throws:
MavenFilteringException- in case of failure.
-
-