I currently need to create a server in order to run a number of unit test. To simplify this process I would like to embed Tomcat into my code and load an instance of Tomcat (which in turn loads my WAR file) before running the unit test (using the @BeforeClass notation).
My issue is how can I deploy my WAR file into the embedded Tomcat?
As you might notice I cannot use the tomcat maven plugin since I want it to run with the automated tests.
See Question&Answers more detail:os