Index: src/main/java/org/apache/maven/shared/filtering/DefaultMavenFileFilter.java =================================================================== --- src/main/java/org/apache/maven/shared/filtering/DefaultMavenFileFilter.java (revision 1235107) +++ src/main/java/org/apache/maven/shared/filtering/DefaultMavenFileFilter.java (working copy) @@ -28,6 +28,7 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Properties; +import java.io.FileNotFoundException; import org.apache.maven.execution.MavenSession; import org.apache.maven.project.MavenProject; @@ -269,6 +270,13 @@ Properties workProperties = new Properties(); workProperties.putAll( baseProps ); + // If there are more than one property files specified + // exception should be thrown if and only if all of them are missing. + // This will ensure having multiple "overridable" property files specified. + + int noOfPropertyFiles = propertiesFilePaths.size(); + int noOfMissingPropertyFiles = 0; + for ( Iterator iterator = propertiesFilePaths.iterator(); iterator.hasNext(); ) { String filterFile = (String) iterator.next(); @@ -284,6 +292,15 @@ filterProperties.putAll( properties ); workProperties.putAll( properties ); } + catch(FileNotFoundException fne) + { + noOfMissingPropertyFiles++; + // Warn about the missing property file + getLogger().warn(" Missing file "+ filterFile); + if (noOfMissingPropertyFiles >= noOfPropertyFiles ) + throw new MavenFilteringException(" All of the property files are missing "+ propertiesFilePaths, fne); + + } catch ( IOException e ) { throw new MavenFilteringException( "Error loading property file '" + filterFile + "'", e );