How to build and deploy war file on local tomcat and start?
Is the tomcat needs to be downloaded each time the build is run? and
what if i have to deploy my application on remote server’s tomcat?
How to build and deploy war file on local tomcat and start?
Is the tomcat needs to be downloaded each time the build is run? and
what if i have to deploy my application on remote server’s tomcat?
Also one more question how to deploy in expolded format on local?
To answer your question, I’d need to know your specific requirements in more detail.
Hi Benjamin, Thanks for your interest in my question. Basically i want to achieve full automation related to build and deploy of the application.
Also there will be other applications running in the same context.
i) deploy the war file to the remote directory(server may be JBoss)
ii) take backup of the existing WAR file and other configuration related files
iii) update few xml files for Datasource,spirng wiring,logging levels related entries.
iv) take backup of the server log files by zipping and then SFTP to local dir.( i am trying to figure out how to use the credentials for logging in into the remote serve as we do in ANT)
v) also the execution of sever startup and shutdown commands(windows, UNIX)
Although the Embedded tomcat is a nice fast process to develop and test, But i want more control of the build process.And one major reason is i don’t know how the embedded one works and how to customize.
For local deployment, I’d recommend having a look at the Cargo plugin. It allows for using the same logic and DSL for a whole variety of application servers and servlet containers which makes switching between containers very easy. You could even have dedicated deployment tasks for different containers.
For remote deployment, you will need to write your own build logic. Have a look at the SSH plugin for implementing the tasks you mentioned above. I am not aware of any other plugin that allows for executing remote commands on Windows. For course you could also wrap existing SSH/SCP Ant tasks from Gradle.
There are other tools (GLU, Fabric…) that specialize in modeling a deployment workflow. You might want to look into those as well.
Thanks for the Information Benjamin. I am now trying my hand on these.