用于一键部署,把本地打包的jar文件,上传到远程服务器上,并执行服务器上的shell命令
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<version>1.0</version>
<configuration>
<serverId>crawler</serverId>
<fromDir>target</fromDir>
<includes>*.jar,*.properties,*.sh</includes>
<url>sftp://59.110.162.178/home/zhangxianhe</url>
<commands>
<command>chmod 755 /home/zhangxianhe/update.sh</command>
<command>/home/zhangxianhe/update.sh</command>
</commands>
<displayCommandOutputs>true</displayCommandOutputs>
</configuration>
</plugin>