Index: src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java =================================================================== --- src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java (revision 157) +++ src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java (working copy) @@ -522,6 +522,15 @@ private List sourceExcludes; /** + * List of exclusions to add to the resource directories on the classpath. + * Adds excluding="" to the classpathentry of the eclipse .classpath file. + * [MECLIPSE-165] + * + * @parameter + */ + private List resourceExcludes; + + /** * List of inclusions to add to the source directories on the classpath. * Adds including="" to the classpathentry of the eclipse .classpath file. *

@@ -814,6 +823,10 @@ if ( sourceExcludes == null ) { sourceExcludes = new ArrayList(); } + + if ( resourceExcludes == null ) { + resourceExcludes = new ArrayList(); + } setupExtras(); @@ -1551,6 +1564,10 @@ getLog().debug( "Processing resource dir: " + resource.getDirectory() ); List excludes = new ArrayList( resource.getExcludes() ); + if (resourceExcludes != null) { + excludes.addAll(resourceExcludes); + } + // automatically exclude java files: eclipse doesn't have the concept of resource directory so it will // try to compile any java file found in maven resource dirs excludes.add( JAVA_FILE_PATTERN );