First of all we must make sure Tomcat accepts installations by scripting instead of the human html GUI version. In the tomcat-users.xml file, located in something similar to this:
Make sure that the admin user, whatever his name is, has the role manager-script. Here's the important part of my file:
<user username="admin" password="somethignsecret" roles="manager-gui,admin-gui,manager,admin,manager-script,admin-script"/>
For this Jenkins job, go to the settings page and add a new post-build action. Choose the "Deploy war/ear to a container".
Now, rebuild your job and when inspecting the console logs you should see that the war/ear is installed!
Deploying /home/johan/.jenkins/jobs/UnitConversion/workspace/target/Unitconversion.war to container Tomcat 7.x Remote Redeploying [/home/johan/.jenkins/jobs/UnitConversion/workspace/target/Unitconversion.war] Undeploying [/home/johan/.jenkins/jobs/UnitConversion/workspace/target/Unitconversion.war] Deploying [/home/johan/.jenkins/jobs/UnitConversion/workspace/target/Unitconversion.war] Finished: SUCCESS
This way it takes two clicks from editing the code in Eclipse to update the site All About Units in production, first commit and push to Git, second start the Jenkins job.
One note, if you have deployed your application with context root "/" in Tomcat as I have done, see http://macgyverdev.blogspot.se/2014/02/how-to-change-context-root-to-in-tomcat.html, you can not have Context path = "/" in the configuration above. Instead, keep multiple context roots in Tomcat, and as in my example add the context root with a longer name, otherwise the deploy plugin cannot undeploy the ROOT web application. If you according to my blog post on it has manipulated the server.xml a reinstallation of "/webappname" will also reinstall the ROOT application since they point to the same directory on disk.