Community
Participate
Working Groups
The "Source" tab under "Java Build Path" in the project properties provides for exclude filters. Allowing an "include filter", or allowing the filter to be defined as either exclude or include, would be useful. Explanation. I've got an existing open-source web project that I'm trying to set up under Eclipse. It uses Ant as the build tool. I use Sysdeo's tomcat plugin to control a tomcat instance, and most of the time don't have problems. But the project uses Ant to build up WEB-INF directories from a number of source directories - specifically it copies property files into WEB-INF/classes from a directory which is not part of their source structure, and a single configuration file into WEB-INF/classes from a configuration directory containing a couple of dozen other files. The problem comes when Eclipse decides to rebuild the project (or I ask it to). The first think Eclipse does is to clean the output folder. Then it compiles the sources and copies the files from the source folders into the output folder. But it wasn't copying the properties or configuration files - which was causing me very intermittent problems until I realized what was going on. I can emulate the behavior of the Ant build file with additional source folders and exclude filters - but especially in the case of the configuration file it would be very convenient to be able to specify only the file or files I want to copy rather than having to exclude every other file. It would also be convenient if the filter were available using a regexp, to be able to include *.properties, for example.
You can either copy the properties and configuration in a source folder or add the configuration folder and the properties folder as source folder. They don't need to have any source files. You can also remove the fact that the output folder is cleared prior to a build.
*** Bug 40925 has been marked as a duplicate of this bug. ***
*** This bug has been marked as a duplicate of 29964 ***