mr.nothing
mr.nothing

Reputation: 5399

maven + ant run local bash script on the remote host

I wonder if it is possible to run local bash script on the remote host?

What I actually trying to do is to check via maven-antrun-plugin and sshexec target if folder exists on the server, then, upload artifact to this folder and do some stuff like unzip, etc. Is it possible to do using maven+ant plugin?

Yeah, yeah, I know maven is not supposed to do this and it's better to use ant or gradle for these purposes, but we are forced to work with maven and can nothing to do with this.

Thanks everyone in advance!

Upvotes: 0

Views: 412

Answers (1)

Daniel Kaplan
Daniel Kaplan

Reputation: 67440

Yes you can do that with sshexec. It has an attribute called input that you can point to a local file to run a script.

Upvotes: 1

Related Questions