The exam-maven-plugin can be used to run integration tests on an OSGi framework launched by Pax Exam in server mode, similar to the Cargo Maven Plugin. This plugin has two goals
stop-test-container which are bound to the
post-integration-test phases, respectively.
Thus, you can run your integration tests in the
integration-test phase, and the Exam Maven Plugin will take care of starting and stopping the OSGi test container.
The Exam Maven Plugin uses the Forked Container. It requires an OSGi framework to be on the test classpath of your Maven project.
configClass parameter takes the fully qualified name of a Java class with a
@Configuration method, defining the options for the Pax Exam container.
There is an example project in the Pax Exam regression test suite.
exam-maven-plugin is completely unrelated to and not to be confused with the
maven-paxexam-plugin of Pax Exam 1.x. The latter is obsolete, no longer maintained and only works with Pax Exam 1.x and Pax Runner.