Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automatic Deployment of Java application on Remote Tomcat

I want to be able to automatically deploy a Java application to a tomcat server.

Current situation:

  • A Java project is under developement in Eclipse
  • A Tomcat Server is running on another machine, serving a WAR file of that project

My goal: An easy possibility to compile and deploy the project into the remote Tomcat server. I don't mind if that would be a console command/script or by using the Eclipse GUI.

Is that possible? If yes, how? (If there are possibilites, which need changes on my setup, feel free to give me advice for a better suiting setup)

Update

Yes, i use Maven.

like image 775
Alp Avatar asked Jun 26 '11 12:06

Alp


2 Answers

If you use Maven I will suggest to use Cargo plugin which supports all Tomcat's version and have ability to deploy to local and remote servers.

like image 71
Slava Semushin Avatar answered Oct 20 '22 12:10

Slava Semushin


If you prefer not to go with Maven or the Cargo plugin you can simply invoke the Tomcat manager deploy URL. Under the covers Cargo is basically doing the same thing. Tomcat also provides Ant tasks to wrap the manager commands. Using the Ant tasks would enable you to invoke them in Eclipse without a plugin.

like image 42
Benjamin Muschko Avatar answered Oct 20 '22 11:10

Benjamin Muschko