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
This commit is contained in:
Brett Leslie Porter 2005-10-03 13:03:52 +00:00
parent 21350c840b
commit b4d541a6cf
1 changed files with 9 additions and 43 deletions

View File

@ -66,22 +66,6 @@ public class ResourcesMojo
*/ */
private List resources; 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}" * @parameter expression="${project}"
* @required * @required
@ -166,7 +150,7 @@ public class ResourcesMojo
try try
{ {
copyFile( source, destinationFile, resource.isFiltering() && filtering ); copyFile( source, destinationFile, resource.isFiltering() );
} }
catch ( IOException e ) catch ( IOException e )
{ {
@ -179,36 +163,18 @@ public class ResourcesMojo
private void initializeFiltering() private void initializeFiltering()
throws MojoExecutionException 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 Properties properties = PropertyUtils.loadPropertyFile( new File( filtersfile ), true, true );
try filterProperties.putAll( properties );
{
filterProperties = PropertyUtils.loadPropertyFile( filterPropertiesFile, true, true );
}
catch ( IOException e )
{
throw new MojoExecutionException( "Error loading property file '" + filterPropertiesFile + "'", e );
}
} }
else catch ( IOException e )
{ {
filterProperties = new Properties(); throw new MojoExecutionException( "Error loading property file '" + filtersfile + "'", e );
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 );
}
}
} }
} }
} }