I currently have a maven web project that I am attempting to write integration tests for. For the structure of the project, I\'ve defined test stubs under src/test/j
You can also do it straightforwardly. This will add both test classes and test resources to the WEB-INF/classes:
maven-antrun-plugin
1.7
process-test-classes
run
I also recommend you place it into separate profile like "integration" and also to override the package name in that profile to not be able to confuse normal war without tests packaged in and the testing war.
The full example with profile is here. You may run mvn clean package to have a war war-it-test.war without tests included, or you may run mvn clean package -Pintegration to have a war war-it-test-integration.war for the war with tests included.