Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 82414

Summary: [workspace] Source directory filters ignored in build files
Product: [Eclipse Project] PDE Reporter: Christophe Avare <christophe.avare>
Component: BuildAssignee: pde-build-inbox <pde-build-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: aniefer
Version: 3.0.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Christophe Avare CLA 2005-01-08 02:46:32 EST
The generated build.xml does not make any use of the source filters (i.e. no
fileset is created).

The result is that the source set is different while compiling in the workbench
and at deployement time.

This is of importance for plugins running in a distributed environment (like
RMI) where only the client or server classes have to be packaged, but not both.

One way of managing this is to generate the files in a separate project and
apply filters on linked source foilders.
This works inside the workbench itself, but not through an Ant build.

See also bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=82412.
Comment 1 Pascal Rapicault CLA 2005-01-10 09:13:44 EST
As a workaround, instead of using source filters have you tried to create
several source folders? Then you can compile them all but only ship the one
required by setting the bin.includes property accordingly.
Comment 2 Christophe Avare CLA 2005-01-10 11:43:13 EST
Yes, that was my first idea.
Unfortunately, i use a CORBA-like stub generator that can only generate all the
files in the same directory.
This is why i tried the source filter.
My workaround today is to have a custom Ant generator that split the files in
different source directories and use your suggestion in the dependant projects.

Anyway, i think it is important to have the best confidence in the Ant build
system: it should reflect the project definition and dependencies exactly
(predictable behavior).
This way, things that are broken in the workspace (because of a wrong
configuration or filter set) are also broken in the deliveries.
Comment 3 Andrew Niefer CLA 2009-10-23 16:40:10 EDT
the exclude.<library> property is now applied to the javac call to filter sources.

*** This bug has been marked as a duplicate of bug 105631 ***