Though a late answer , someone might find this useful.
If you are using maven3 and tomcat7.The below method worked for me.I was not aware of the change in application manager endpoint in tomcat7.
Environment - Apache Maven 3.0.4,apache-tomcat-7.0.34,Windows 7
Tomcat7 has changed its deployment end point from http://tomcatserver:8080/manager/html
to http://tomcatserver:8080/manager/text
.
So my pom.xml will be
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<configuration>
<url>http://tomcatserver:8080/manager/text</url>
<server>tomcat</server>
<path>/myWebApp</path>
</configuration>
</plugin>
In tomcat-users.xml
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<role rolename="admin-gui"/>
<role rolename="admin-script"/>
<user username="root" password="root" roles="manager-gui,manager-script,manager-jmx,manager-status,admin-gui,admin-script"/>
In maven settings.xml
<server>
<id>tomcat</id>
<username>root</username>
<password>root</password>
</server>
In context.xml , though this is optional and is not related to maven3 deployment to tomcat7 ,sometimes jar locking might happen,so to be on the safer side.
<Context antiJARLocking="true" antiResourceLocking="true">
Now issue
mvn tomcat:deploy
Remember to start tomcat before maven deployment.
If deployment is success , your application will be available at
http://tomcatserver:8080/myWebApp
This is a "feature" of the M2E plugin that had been introduced a while ago. It's not directly related to the JBoss EAR plugin but also happens with most other Maven plugins.
If you have a plugin execution defined in your pom
(like the execution of maven-ear-plugin:generate-application-xml
), you also need to add additional config information for M2E that tells M2E what to do when the build is run in Eclipse, e.g. should the plugin execution be ignored or executed by M2E, should it be also done for incremental builds, ... If that information is missing, M2E complains about it by showing this error message:
"Plugin execution not covered by lifecycle configuration"
See here for a more detailed explanation and some sample config that needs to be added to the pom to make that error go away:
https://www.eclipse.org/m2e/documentation/m2e-execution-not-covered.html
Best Answer
Make sure that you have "Maven Integration for WTP" installed in your Eclipse instance.
First check if it's available through
If for whatever reason this does not work, you can get WTP integration from this update site (that's the version I am currently using):
https://repository.sonatype.org/content/repositories/forge-sites/m2eclipse-wtp/0.13.0/S/0.13.0.20110623-0455
This integration does a lifecycle mapping of maven-war-plugin into m2e architecture.
Once you've installed the WTP integration, you must restart eclipse and once it's restarted, right click on your web app project and choose: Maven->Update Project Configuration...
Also, I would advise to run a clean build at this time.
Last, but not least, delete and recreate your Tomcat server configuration (I don't know why, but I had to do it quite a few times when I switched to m2e).