In eclipse 3.6 right click on the project, press properties. Then go to "deployment assembly" property page. There you can define, what are the parts of the project artifact.
Update:
On the other hand, the GUI of WTP do not support everything the builder can handle. Source folders can be easily excluded, if you edit the .settings/org.eclipse.wst.common.component
file (both in 3.5 and 3.6 eclipse) in project root. It does look like this (example from one of my projects):
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="gui">
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<wb-resource deploy-path="/" source-path="/src/main/webapp"/>
<dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/aoprules/aoprules">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/base/base">
<dependency-type>uses</dependency-type>
</dependent-module>
<property name="context-root" value="gui"/>
<property name="java-output-path" value="/gui/target/classes"/>
</wb-module>
</project-modules>
You simply remove the project-modules/wb-module/wb-resource
element, which has the src/test
as source-path
attribute. Then refresh project.