MrProper
MrProper

Reputation: 1580

How to automatically deploy maven project from eclipse to tomcat

See title. I would also like the project to redeploy after every change. I am new to this area so my knowledge isnt that good. I tried googling and searching here, but I can't find any answer.

thanks for any help

Upvotes: 4

Views: 7654

Answers (2)

Guillaume Polet
Guillaume Polet

Reputation: 47637

There are two plugins that combined together in Eclipse work quite well together to perform what you want:

  1. M2E: M2Eclipse which handles everything related to Maven.
  2. Eclipse Web Tool Platform (WTP): which handles everything Java EE related (Tomcat, JBoss, etc...)

For M2E to work properly with WTP, you need to add m2e-wtp. You may find several useful information as well as some good links here.

I would start from the Eclipse Java EE distribution (it includes already Eclipse-WTP) and then add M2E (either with their update site or through eclipse market place: look for M2E and M2E-WTP).

From there, you create a Web Project and you can run it on a Tomcat server. The first time you try to run you project on a server, you will install Tomcat and it will appear in view named "Server". Double click on the server to configure ports, automatic deployment etc...

Upvotes: 3

kapandron
kapandron

Reputation: 3671

You can easily deploy a webapp using the Cargo Tomcat plugin. Here's helpful articles on this topic:

Maven Tomcat Deployment using Cargo plugin.

Autodeployment with Maven, Tomcat, and Cargo.

Upvotes: 3

Related Questions