Automating with Ant on a server
I have a a开发者_如何学Gont file on the server-side, and from the client-side I need to execute it on the server, how can this be done?
SSH should work on any Unix system:
ssh gooner@host.example.com ant -f /home/gooner/build.xml
Do not use RSH - it's obsolete, and it's been replaced with the more secure SSH.
You could execute the ANT build script and targets from a servlet.
This article explains how: http://onjava.com/pub/a/onjava/2002/07/24/antauto.html?page=1
Perhaps overkill for your situation, but you might want to look at Hudson. It is a Java build server with a web interface. It is relatively easy to set up and configure projects, though you will need to run a servlet container on your server (such as Apache Tomcat).
精彩评论