Using Maven to Run a Remote Command

What is the best way to get Maven to execute a command on a remote server?

Before using the station wagon to move my newly created jar to our development environment, I want to close the service, which depends on it.

The best I can think of so far is to use exec-maven-plugin to execute a remote command via ssh. Is there a better / more preferable way to do this?

+2
source share
2 answers

AFAIK, Maven does not provide any specific support for executing ssh commands. Therefore, either use the Maven exec plugin or the Maven AntRun Plugin and the SSHEXEC Ant task if portability is a problem.

+3

sshexec-maven-plugin.

:

0

All Articles