How do I exclude particular resources from being processed?
Author: Deron Eriksson
Description: This maven tutorial describes how to exclude particular resources from being processed.
Tutorial created using: Windows Vista || JDK 1.6.0_04 || Eclipse Web Tools Platform 2.0.1 (Eclipse 3.3.1)

Page:    1 2 >

Suppose that we have the following "aproject" project that contains files in a src/main/resources directory. In the following example, this directory contains two text files and two HTMLW files.

'aproject' in Eclipse Navigator View

We might have a situation where we're interested in allowing some of the files to be added to the build while other files are excluded. We can specify resources that we'd like to include and exclude in our pom.xml file. The following pom.xml file specifies that we'd like to exclude all files with the .htm extension within the resources directory. In this pom.xml file, I also need to explicitly specify the location of the resources directory since I'm overriding the defaults.


<project xmlns="" xmlns:xsi=""

(Continued on page 2)

Page:    1 2 >