Bug 9511 - Exclude files and whole packages from build
Summary: Exclude files and whole packages from build
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 2.1 M4   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-02-13 02:42 EST by Markus Oellinger CLA
Modified: 2003-04-02 06:20 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Oellinger CLA 2002-02-13 02:42:59 EST
Sometimes, it happens that parts of the project break the compilation or are 
otherwise checked in in the repository although they don't really compile yet 
(for whatever reason).
I think it would be a good idea to be able to exclude individual files or whole 
packages from build to avoid that a few files that are currently not needed 
break the whole compilation.
Excluding files from build is also possible in MS Visual Studio, for example.
Comment 1 Philipe Mulet CLA 2002-02-13 06:11:25 EST
Can't you simply remove them from the classpath ? What kind of mechanism are 
you looking for, an exclude list ?
Comment 2 Markus Oellinger CLA 2002-02-14 02:48:17 EST
Sometimes, the repository contains sources you'd like to exclude from build.
This may happen, for example, if some team member checks in stuff that does not 
compile or that you otherwise don't want to include in your build.

These files then are in the source path (not classpath) and eclipse 
automatically includes them in the build. If I'd make a manual build script, I'd 
just exclude those files/directories from the build script.

At present, my workaround is to twink the config-spec in clearcase such that 
unwanted files don't show up for me in the repository but this is sometimes not 
easy to do.

The way I'd imagine it to work would be that you go into properties of a 
file/package and have a check-mark Exclude from build which would explictly 
remove the file/package from the build sources.
Comment 3 Philipe Mulet CLA 2002-02-17 20:01:39 EST
What about codeassist, would you expect it also to see these excluded files ? 
Aren't you rather asking for excluding files throughout the entire Java 
tooling ?
Comment 4 Markus Oellinger CLA 2002-02-19 12:24:40 EST
I'd rather only exclude them from the build process.
If they are broken, however, codeassist will not take them into account anyway.
If you exclude them for some other reason, you'll probably want to have those 
parts that are working being taken into account by codeassist.
Comment 5 Philipe Mulet CLA 2002-02-28 06:26:27 EST
This isn't on the plan currently, will consider post 2.0.
Comment 6 Philipe Mulet CLA 2003-04-02 06:15:32 EST
In 2.1, we added support for source exclusion patterns.
Comment 7 Philipe Mulet CLA 2003-04-02 06:20:29 EST
Note that excluded sources are excluded from build, search, codeassist, etc...
in a consistent manner.

Closing.