Running code before and after all tests in a surefire execution
I have a Grizzly HttpServer that I want to run for the entire duration of a test group execution. Additionally, I want to interact with the global HttpServer instance from a @Rule inside the tests themselves. Since I'm using Maven Surefire rather than using JUnit test suites, I can't use @BeforeClass / @AfterClass on the test suite itself. Right now, all I can think of is lazily initialising a static field and stopping the server from a Runtime.addShutdownHook() -- not nice! Matthew Farwell There are two options, a maven solution and a surefire solution. The least coupled solution is to