Excluding test Classes from WTP deploy

adam

I was finding that test classes were somehow ending up compiled into the web application deployed onto Tomcat. I spent a fair bit of energy reading through the Eclipse ETP help files but there wasn’t any reference that I could find to reconfiguring an existing dynamic web application. In desperation I started hunting through the configuration files under the .settings folder in my project ad low and behold there i found it.

Just in case i forget or someone else has this problem the file is called org.eclipse.wst.common.component in that file are wb-resource entries for each source folder which is being compiled and/or copied into the classes directory under WEB-INF. I deleted the entries for source/test/java and source/test/resources and that took care of things.


One Response to “Excluding test Classes from WTP deploy”

  • Juan Says:

    Thanks!! Very useful post. I guess this is some kind of bug as I have 2 projects and only one had these entries.

Leave a Reply