On some projects, the distinction between unit tests and integration tests is clear, if not in the place most people think of it. In particular, on my current project, unit tests are the tests that can be run without
JBoss running; integration tests are the ones that require the JBoss container.
This appears to be the distinction that the maven lifecycle envisions, with a setup phase that would allow deployment into the container and starting it, which happens after the package phase but before the integration testing phase.
That said, there doesn't seem to be any established convention for where the tests should go. You can use some plugins and just name the tests differently, keeping them all in the test directory; other plugins envision an integration test directory in parallel to the test directory.
To me, the latter seems to be more consistent with the
philosophy of maven, as the idea behind having a separate test directory in the first place is to distinguish tests on something other than just the name. I haven't actually gotten to the point where I'm converting integration tests to maven yet, though.
Has anyone actually gotten to that point, what was your situation, and how did you handle it?