From b4d541a6cf0d26f2b1edd8a1ead2ada9a1e528a7 Mon Sep 17 00:00:00 2001 From: Brett Leslie Porter Date: Mon, 3 Oct 2005 13:03:52 +0000 Subject: [PATCH] PR: MNG-644 remove deprecated filter settings git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@293327 13f79535-47bb-0310-9956-ffa450edef68 --- .../maven/plugin/resources/ResourcesMojo.java | 52 ++++--------------- 1 file changed, 9 insertions(+), 43 deletions(-) diff --git a/maven-plugins/maven-resources-plugin/src/main/java/org/apache/maven/plugin/resources/ResourcesMojo.java b/maven-plugins/maven-resources-plugin/src/main/java/org/apache/maven/plugin/resources/ResourcesMojo.java index 5381dfb12f..93944d50f6 100644 --- a/maven-plugins/maven-resources-plugin/src/main/java/org/apache/maven/plugin/resources/ResourcesMojo.java +++ b/maven-plugins/maven-resources-plugin/src/main/java/org/apache/maven/plugin/resources/ResourcesMojo.java @@ -66,22 +66,6 @@ public class ResourcesMojo */ private List resources; - /** - * Wheter to apply filters during transfer. - * - * @parameter - * @deprecated - */ - private boolean filtering = true; - - /** - * The name of the filter property file to use. - * - * @parameter expression="${basedir}/filter.properties" - * @deprecated use the filters section of the POM. - */ - private File filterPropertiesFile; - /** * @parameter expression="${project}" * @required @@ -166,7 +150,7 @@ public class ResourcesMojo try { - copyFile( source, destinationFile, resource.isFiltering() && filtering ); + copyFile( source, destinationFile, resource.isFiltering() ); } catch ( IOException e ) { @@ -179,36 +163,18 @@ public class ResourcesMojo private void initializeFiltering() throws MojoExecutionException { - if ( filtering ) + filterProperties = new Properties(); + for ( Iterator i = filters.iterator(); i.hasNext(); ) { - if ( filters == null || filters.isEmpty() && filterPropertiesFile.exists() ) + String filtersfile = (String) i.next(); + try { - // Deprecated - remove - try - { - filterProperties = PropertyUtils.loadPropertyFile( filterPropertiesFile, true, true ); - } - catch ( IOException e ) - { - throw new MojoExecutionException( "Error loading property file '" + filterPropertiesFile + "'", e ); - } + Properties properties = PropertyUtils.loadPropertyFile( new File( filtersfile ), true, true ); + filterProperties.putAll( properties ); } - else + catch ( IOException e ) { - filterProperties = new Properties(); - for ( Iterator i = filters.iterator(); i.hasNext(); ) - { - String filtersfile = (String) i.next(); - try - { - Properties properties = PropertyUtils.loadPropertyFile( new File( filtersfile ), true, true ); - filterProperties.putAll( properties ); - } - catch ( IOException e ) - { - throw new MojoExecutionException( "Error loading property file '" + filtersfile + "'", e ); - } - } + throw new MojoExecutionException( "Error loading property file '" + filtersfile + "'", e ); } } }