Skip to Main Content
Eclipse Cookbook
book

Eclipse Cookbook

by Steve Holzner
June 2004
Beginner to intermediate content levelBeginner to intermediate
364 pages
7h 38m
English
O'Reilly Media, Inc.
Content preview from Eclipse Cookbook

11.8. Avoiding Output Folder Scrubs

Problem

Now that you’re working with the files in a web server’s directories, you want to change Eclipse’s default behavior of scrubbing—that is, deleting—all the files in a build directory because doing so deletes needed files in those directories.

Solution

To stop Eclipse from scrubbing the output directory for a project every time you build the project, select Project Properties Java Compiler Use Project Settings Build Path, and uncheck the “Scrub output folders on full build” checkbox.

Discussion

When you start working with the files in a web container’s directories and not just your local Eclipse workspace, it can become a problem when Eclipse deletes all files in the output directory when you do a build (this is the default behavior). Those files might be other servlets that you need, for example, or configuration files needed by the server. It’s not a problem when you’re working with a workspace in Eclipse, where one project uses one directory, but when directories are shared by many files, as they are in web containers, it can be a serious problem.

To change this default behavior in Eclipse, select Project Properties Java Compiler Use Project Settings Build Path, and uncheck the “Scrub output folders on full build” checkbox, as shown in Figure 11-8. That stops Eclipse from scrubbing the output folder by default.

Avoiding output folder scrubs

Figure 11-8. Avoiding output ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Eclipse

Eclipse

Steve Holzner
Official Eclipse 3.0 FAQs

Official Eclipse 3.0 FAQs

John Arthorne, Chris Laffra

Publisher Resources

Supplemental ContentCatalog PageErrata