Recipe 11.8 Avoiding Output Folder Scrubs

     

11.8.1 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, deletingall the files in a build directory because doing so deletes needed files in those directories.

11.8.2 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.

11.8.3 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.

Figure 11-8. Avoiding output folder scrubs
figs/ecb_1108.gif



Eclipse Cookbook
Inside XML (Inside (New Riders))
ISBN: 596007108
EAN: 2147483647
Year: 2006
Pages: 232
Authors: Steve Holzner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net