I've been trying to set up the cargo-maven2 plugin (although I am using Maven 3; and this is supposed to be ok) so that I can start a container during the pre-integration-test phase and shut it down in the post-integration test phase.
I'm having no luck. I keep getting this error message:
Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.2.4:start (start-container) on project microgivr.web: Execution start-container of goal org.codehaus.cargo:cargo-maven2-plugin:1.2.4:start failed: Unable to load the mojo 'start' in the plugin 'org.codehaus.cargo:cargo-maven2-plugin:1.2.4'. A required class is missing: org/apache/tools/ant/BuildException
Easy fix, right? Add Ant as a dependency. So I add:
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.8.4</version>
</dependency>
(And lord only know why this should need Ant in the first place.)
I can now find org.apache.tools.ant.BuildException on my classpath, but I STILL get this error.
So, thinking this is surely some issue with my own build, I decided to start fresh, using the maven2-cargo-plugin archetype documented here: http://cargo.codehaus.org/Maven2+Archetypes
You know what? Same problem!
I've tried different versions of the plugin. I've tried different versions of Ant. No luck.
Someone MUST have run into this before. I see mentions of this issue online, but don't see any solutions.
Any insight is appreciated!