Excluding resources and test classes from war/ear in Eclipse

PDF

Today I was trying to figure out how to exclude certain resources/classes from the war that was being deployed to my embedded server in Eclipse. I couldn’t find out how to do this in the Eclipse settings file.

Apparently, it has nothing to do with the source folder you see in the Project Explorer view, or the export settings in the Buildpath dialogs: instead you need to edit the Eclipse settings file “project-war.settingsorg.eclipse.wst.common.component” (viewable in the Navigator view) and modify the deployed source folders in there. Changes there do *not* reflect in the Project explorer (at least not with my version of Eclipse, Galileo). I’ve removed the test sourcefolder from there and everything was honky dory.

Tags:

Leave a Reply