What is the difference between maven-failsafe-plugin and maven-surefire-plugin?

maven-surefire-plugin is designed for running unit tests and if any of the tests fail then it will fail the build immediately.

maven-failsafe-plugin is designed for running integration tests, and decouples failing the build if there are test failures from actually running the tests.

[top]


How can I reuse my test code in other modules?

Visit this link for your reference, | Attaching tests

[top]


How can I run GWT tests ?
There is a specific gwt-maven-plugin at codehaus, but if you want to run with surefire, you need the following settings:

Use the following configuration:

<useSystemClassLoader>true</useSystemClassLoader>

<useManifestOnlyJar>false</useManifestOnlyJar>

<forkMode>once</forkMode>

forkMode at least once, always if not enough

[top]