[MRESOURCES-187] New parameter in the plugin to be able to use filename filtering.
Added integration test.


git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk@1718087 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/it/filter-filenames/pom.xml b/src/it/filter-filenames/pom.xml
new file mode 100644
index 0000000..befb406
--- /dev/null
+++ b/src/it/filter-filenames/pom.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.plugins</groupId>
+  <artifactId>maven-resources-plugin-it-filter-filenames</artifactId>
+  <packaging>jar</packaging>
+  <version>1.0-SNAPSHOT</version>
+
+  <build>
+    <resources>
+      <resource>
+        <directory>src/main/resources</directory>
+        <filtering>true</filtering>
+      </resource>
+    </resources>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <artifactId>maven-resources-plugin</artifactId>
+          <version>@project.version@</version>
+          <configuration>
+            <fileNameFiltering>true</fileNameFiltering>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+</project>
diff --git "a/src/it/filter-filenames/src/main/resources/$\173project.artifactId\175.txt" "b/src/it/filter-filenames/src/main/resources/$\173project.artifactId\175.txt"
new file mode 100644
index 0000000..7aeb293
--- /dev/null
+++ "b/src/it/filter-filenames/src/main/resources/$\173project.artifactId\175.txt"
@@ -0,0 +1,3 @@
+${project.groupId}
+${project.version}
+${project.artifactId}
diff --git "a/src/it/filter-filenames/src/main/resources/$\173project.version\175.txt" "b/src/it/filter-filenames/src/main/resources/$\173project.version\175.txt"
new file mode 100644
index 0000000..7aeb293
--- /dev/null
+++ "b/src/it/filter-filenames/src/main/resources/$\173project.version\175.txt"
@@ -0,0 +1,3 @@
+${project.groupId}
+${project.version}
+${project.artifactId}
diff --git a/src/it/filter-filenames/verify.groovy b/src/it/filter-filenames/verify.groovy
new file mode 100644
index 0000000..bda24ad
--- /dev/null
+++ b/src/it/filter-filenames/verify.groovy
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+def fileName = '1.0-SNAPSHOT.txt'
+def targetClassFolder = 'target/classes/'
+assert new File(basedir, targetClassFolder + fileName).exists();
+
+content = new File(basedir, targetClassFolder + fileName).text;
+assert content.contains( 'org.apache.maven.plugins');
+assert content.contains( 'maven-resources-plugin-it-filter-filenames');
+assert content.contains( '1.0-SNAPSHOT');
+
+fileName = 'maven-resources-plugin-it-filter-filenames.txt'
+assert new File(basedir, targetClassFolder + fileName).exists();
+
+content = new File(basedir, targetClassFolder + fileName).text;
+assert content.contains( 'org.apache.maven.plugins');
+assert content.contains( 'maven-resources-plugin-it-filter-filenames');
+assert content.contains( '1.0-SNAPSHOT');
+
+return true;
diff --git a/src/main/java/org/apache/maven/plugin/resources/ResourcesMojo.java b/src/main/java/org/apache/maven/plugin/resources/ResourcesMojo.java
index 3e1a693..4e04c62 100644
--- a/src/main/java/org/apache/maven/plugin/resources/ResourcesMojo.java
+++ b/src/main/java/org/apache/maven/plugin/resources/ResourcesMojo.java
@@ -236,7 +236,7 @@
     /**
      * Support filtering of filenames folders etc.
      * 
-     * @since 2.8
+     * @since 3.0.0
      */
     @Parameter( defaultValue = "false" )
     private boolean fileNameFiltering;