原先本地调试好代码之后,打 war 包,再把 war 通过 scp 或 lrzsz 转到服务器,感觉很麻烦,于是写了个 maven 插件
快速开始
git clone https://github.com/toalaska/maven-plugin-deploy mvn install
在你的项目中 pom.xml 加入
psw和id_rsa_path 二选一 <plugin> <groupId>cn.toalaska</groupId> <artifactId>deploy</artifactId> <version>1.10-SNAPSHOT</version> <configuration> <basedir>${basedir}</basedir> <host>192.168.199.241</host> <user>root</user> <!-- <psw>your pwd</psw> --> <id_rsa_path>C:\Users\Myra\.ssh\id_rsa</id_rsa_path> <files>nh.png:/tmp/dddd/nh.png</files> </configuration> <executions> <execution> <!-- phase表示运行在哪个阶段 --> <phase>clean</phase> <goals> <!--goal标识运行哪个命令,可以这样认为--> <goal>deploy</goal> </goals> </execution> </executions> </plugin>
github 地址:https://github.com/toalaska/maven-plugin-deploy
欢迎提意见
欢迎来到这里!
我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。
注册 关于