6

I want to deploy a jar file to a remote server and run it. Is there a plugin for maven can do this process? I know that tomcat for maven plugin can deploy the war file to remote server, but my project is not a servlet project. I think the process is that: 1. transfer the jar file to remote server. 2. ran the jar file.

What is a better solution? Thanks!

user3505098
  • 73
  • 1
  • 5
  • You could check http://maven.apache.org/plugins/maven-deploy-plugin/examples/deploy-ssh-external.html – ravthiru Feb 08 '17 at 05:10

1 Answers1

5

A combination of these two questions will probably be what you need:

Maven copy local file to remote server using SSH

Run remote command via ssh using Maven3

Community
  • 1
  • 1
Catchwa
  • 5,845
  • 4
  • 31
  • 57