【发布时间】:2017-07-18 16:21:38
【问题描述】:
我正在使用 maven 构建我的 spring boot jar。
使用 wagon-maven-plugin 我可以将它上传到我的开发服务器上,但是我需要 ssh 到服务器并执行 java -jar package.jar 命令来启动应用程序. maven有没有办法上传jar然后运行它?
我已经尝试过 men:spring-boot:run 但它看起来只适用于本地,无法上传...
【问题讨论】:
-
如果你有 Jenkins 作为守卫,你可以把这个流程放到部署中,然后跳两步,但仍然需要 ssh 登录。
-
heroku 呢? Deploying Spring Boot Applications to Heroku.
-
在我看来 maven-deploy-plugin 会做到的...Deployment of artifacts in an external SSH command。只需添加 args 即可使用 ssh 命令运行 shell 脚本。
标签: maven spring-boot