Using Codehaus Cargo to compile war

I got this error message

"Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:deploy

when I run

$ mvn tomcat7:deploy

to compile and generate a war file. I tried many ways to deploy a war file in Tomcat 7 unsuccessfully. Then, I found the Codehaus Cargo maven plugin.

Codehaus Cargo can be directly run on any existing Maven Java EE project (WAR, EAR or other) by running: