Goal

Currently some plugins duplicates/modify classes coming the ressources plugin or build their own to handle (copy and filtering) resources.
A common component could provide a common way for all plugins which needs to filtering resources.

This component will apply filtering on a List of org.apache.maven.model.Resource.

A default List of FileUtils.FilterWrapper (see above) will be provided.

The component will not filtering some predefined file extensions (jpg,jpeg,gif,bmp,png). Note : you can easily add extra file extensions.

The issue is http://jira.codehaus.org/browse/MNG-3374.

Filtering

Some default FileUtils.FilterWrapper will be used :

The values (Properties object) used for interpolation are loaded with the following order :

NOTE : As it's a Properties object, last defined key/value pair wins .

NOTE : When building the global Properties object and reading the properties files defined the different filters, interpolation with the token ${ } is supported for this filters with a limited properties values coming from pom.properties and mavenSession.executionProperties (last wins too)

NOTE : currently in the resources plugin System.properties is used instead of mavenSession.executionProperties

NOTE : currently in the resources pluginĀ  pom.properties wins on System.properties. This will be changed to this order pom.properties -> mavenSession.executionProperties

Some part has been implemented in the sandbox/shared (https://svn.apache.org/repos/asf/maven/sandbox/trunk/shared/maven-filtering/). The current war trunk use it.

A branch of the resources plugin use it too issue http://jira.codehaus.org/browse/MRESOURCES-56 (svn https://svn.apache.org/repos/asf/maven/plugins/branches/MRESOURCES-56/)

Votes

Please provide comments with your votes.
+1 : Olivier Lamy
+0 :
- 1 :