Home All Groups
maven-filtering / org / apache / maven / shared / filtering / DefaultMavenResourcesFiltering.html /
org.apache.maven.shared.filtering

Class DefaultMavenResourcesFiltering

  • java.lang.Object
    • org.codehaus.plexus.logging.AbstractLogEnabled
      • org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering
  • All Implemented Interfaces:
    MavenResourcesFiltering, org.codehaus.plexus.logging.LogEnabled, org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable

    public class DefaultMavenResourcesFiltering
    extends org.codehaus.plexus.logging.AbstractLogEnabled
    implements MavenResourcesFiltering, org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable
    Author:
    Olivier Lamy
    • Constructor Detail

      • DefaultMavenResourcesFiltering

        public DefaultMavenResourcesFiltering()
    • Method Detail

      • initialize

        public void initialize()
                        throws org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException
        Specified by:
        initialize in interface  org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable
        Throws:
        org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException
      • filterResources

        public void filterResources(List<org.apache.maven.model.Resource> resources,
                           File outputDirectory,
                           org.apache.maven.project.MavenProject mavenProject,
                           String encoding,
                           List<String> fileFilters,
                           List<String> nonFilteredFileExtensions,
                           org.apache.maven.execution.MavenSession mavenSession)
                             throws MavenFilteringException
        Specified by:
        filterResources in interface  MavenResourcesFiltering
        Parameters:
        resources - List of Resource
        outputDirectory - parent destination directory
        mavenProject - the maven project
        encoding - encoding to use for writing files
        fileFilters - List of String which are path to a Property file
        nonFilteredFileExtensions - List of String for non filtered file extensions
        mavenSession - Can include executionProperties that will be used for filtering
        Throws:
        MavenFilteringException
      • filterResources

        public void filterResources(List<org.apache.maven.model.Resource> resources,
                           File outputDirectory,
                           String encoding,
                           List<org.apache.maven.shared.utils.io.FileUtils.FilterWrapper> filterWrappers,
                           File resourcesBaseDirectory,
                           List<String> nonFilteredFileExtensions)
                             throws MavenFilteringException
        Specified by:
        filterResources in interface  MavenResourcesFiltering
        Parameters:
        resources - List of Resource
        outputDirectory - parent destination directory
        encoding - encoding to use for writing files
        filterWrappers - List of FileUtils.FilterWrapper
        resourcesBaseDirectory - baseDirectory of resources
        nonFilteredFileExtensions - List of String for non filtered file extensions
        Throws:
        MavenFilteringException
      • filteredFileExtension

        public boolean filteredFileExtension(String fileName,
                                    List<String> userNonFilteredFileExtensions)
        Specified by:
        filteredFileExtension in interface  MavenResourcesFiltering
        Parameters:
        fileName - the file name
        userNonFilteredFileExtensions - an extra list of file extensions
        Returns:
        true if filtering can be applied to the file (means extensions.lowerCase is in the default List or in the user defined extension List)

Copyright © 2002-2014 The Apache Software Foundation. All Rights Reserved.