I think you'd want to write a maven plugin (not that difficult) that uses either apache mina's ssh support, or jsch's ssh support or one of the other ssh java libraries to login to the remote host and run the commands you are after.
It would not be too hard. Otherwise you could use "expect" to run the deployment and invoke the expect script via e.g. exec-maven-plugin. The disadvantage of that technique is that you now are tied to building on linux. A ssh scripting maven plugin would not have the issue as you would be using the ssh client progamatically -Stephen On 14 September 2010 08:20, fhomasp <[email protected]> wrote: > > Hey, > > In order to deploy an ear to a severely secured OC4J server I need to use a > script file provided by the system admins. This is the only way that > they'll allow deployment. I'd like to automate the process. > So far I've managed to access the servers with the Wagon plugin using SFTP > to copy the built artifacts to a given location. When that's done I now > need to use an ssh client (xshell or telnet) to access the server, navigate > to a certain path and run the script. > > If anyone can point me into the right direction to automate this using > Maven > 2 that'll be swell ^^ > I should be able to run this in a local windows environment as well as in > Hudson, or anywhere else. > > Thanks! > -- > View this message in context: > http://maven.40175.n5.nabble.com/run-command-remotely-on-Unix-using-Maven-tp2838719p2838719.html > Sent from the Maven - Users mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
