You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kh...@apache.org on 2016/05/15 22:49:41 UTC

svn commit: r1743983 - in /maven/plugins/trunk/maven-resources-plugin/src/site/apt/examples: binaries-filtering.apt.vm filter.apt

Author: khmarbaise
Date: Sun May 15 22:49:40 2016
New Revision: 1743983

URL: http://svn.apache.org/viewvc?rev=1743983&view=rev
Log:
[MRESOURCES-221] Additional practices for Filtering example page
 o Fixed some parts of the binaries-filtering.apt.vm page.
 o Added best practice for filtered/non filtered folders

Modified:
    maven/plugins/trunk/maven-resources-plugin/src/site/apt/examples/binaries-filtering.apt.vm
    maven/plugins/trunk/maven-resources-plugin/src/site/apt/examples/filter.apt

Modified: maven/plugins/trunk/maven-resources-plugin/src/site/apt/examples/binaries-filtering.apt.vm
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/site/apt/examples/binaries-filtering.apt.vm?rev=1743983&r1=1743982&r2=1743983&view=diff
==============================================================================
--- maven/plugins/trunk/maven-resources-plugin/src/site/apt/examples/binaries-filtering.apt.vm (original)
+++ maven/plugins/trunk/maven-resources-plugin/src/site/apt/examples/binaries-filtering.apt.vm Sun May 15 22:49:40 2016
@@ -26,14 +26,13 @@
 ~~ NOTE: For help with the syntax of this file, see:
 ~~ http://maven.apache.org/doxia/references/apt-format.html
 
-Binaries filtering
+Binary filtering
 
- Now the plugin will prevent binaries files filtering without adding some excludes configuration.
- 
- By default, files with extensions (jpg, jpeg, gif, bmp and png) won't be filtered anymore.
- 
- Users can add some extra file extensions to not apply filtering with the following configuration :
+ The plugin will prevent binary files filtering without adding some <<<excludes>>> configuration
+ for the following file extensions <<<jpg>>>, <<<jpeg>>>, <<<gif>>>, <<<bmp>>> and <<<png>>>.
  
+ If you like to add supplemental file extensions this can simply achieved by
+ using a configuration like the following:
 
 +-----+
 <project>

Modified: maven/plugins/trunk/maven-resources-plugin/src/site/apt/examples/filter.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-resources-plugin/src/site/apt/examples/filter.apt?rev=1743983&r1=1743982&r2=1743983&view=diff
==============================================================================
--- maven/plugins/trunk/maven-resources-plugin/src/site/apt/examples/filter.apt (original)
+++ maven/plugins/trunk/maven-resources-plugin/src/site/apt/examples/filter.apt Sun May 15 22:49:40 2016
@@ -165,10 +165,12 @@ your.name = world
     ...
 +-----+
 
-  <<Warning:>> Do not filter files with binary content like images! This will most likely result in corrupt output. If
-  you have both text files and binary files as resources, you need to declare two mutually exclusive resource sets. The
-  first resource set defines the files to be filtered and the other resource set defines the files to copy
-  unaltered as illustrated below:
+  
+  <<Warning:>> Do not filter files with binary content like images! This will most likely result in corrupt output. 
+
+  If you have both text files and binary files as resources it is recommended to have two separated
+  folders. One folder <<<src/main/resources>>> (default) for the resources which are not filtered and 
+  another folder <<<src/main/resources-filtered>>> for the resources which are filtered.
 
 +-----+
 <project>
@@ -177,18 +179,8 @@ your.name = world
     ...
     <resources>
       <resource>
-        <directory>src/main/resources</directory>
+        <directory>src/main/resources-filtered</directory>
         <filtering>true</filtering>
-        <includes>
-          <include>**/*.xml</include>
-        </includes>
-      </resource>
-      <resource>
-        <directory>src/main/resources</directory>
-        <filtering>false</filtering>
-        <excludes>
-          <exclude>**/*.xml</exclude>
-        </excludes>
       </resource>
       ...
     </resources>
@@ -197,3 +189,11 @@ your.name = world
   ...
 </project>
 +-----+
+
+  Now you can put those files into <<<src/main/resources>>> which should not filtered and the other files
+  into <<<src/main/resources-filtered>>>.
+  
+  As already mentioned filtering binary files like images,pdf`s  etc. could result in corrupted output.
+  To prevent such problems you can {{{./binaries-filtering.html}configure file extensions}}
+  which will not being filtered. 
+