Jenkins provides plugins to help you deploy your application to a number of commonly-used application servers. The Deploy plugin lets you deploy to Tomcat, JBoss, and GlassFish. And the Deploy Websphere plugin tries to cater for the particularities of IBM WebSphere Application Server.
For other application servers, you will typically have to integrate the deployment process into your build scripts, or resort to custom scripts to deploy your application. For other languages, too, your deployment process will vary, but it will often involve some use of shell scripting. For example, for a Ruby on Rails application, you may use a tool like Capistrano or Chef, or simply a shell script. For a PHP application, an FTP or SCP file transfer may suffice.
Let’s first look at some strategies for deploying your Java applications to an application server.
This is known as a hot-deploy, where the application is deployed onto a running server. This is generally a fast and efficient way of getting your application online. However, depending on your application and on your application server, this approach has been known to result in memory leaks or resource locking issues—older versions of Tomcat, for example, were particularly well-known for this. If you run into this sort of issue, you may have to force the application to restart after each deployment, or possibly schedule a nightly restart of the application server on your test machine.