February 05, 2018 11:02:17 read: 851
1, how to build the jar package can refer to the following link: http://blog.csdn.net/zk0920zk/article/details/79230707
2, next talk about how to upload files to Linux via Windows bat
Add Windows Batcht Code
- Echo "Start uploading Files"
- Pscp-l name-pw password-r h:/a.csv name@ip:/usr/local/beta
- echo "Upload file succeeded"
- Exit
Name is the Linux login user name, password is the password, IP is the address of the Linux, after the execution of the command found that hit jar package did not succeed, reported the following error
It is necessary for us to actively enter the Y consent to upload, then in the execution of the bat file, how to automatically enter Y, very simple, first in the local create a TXT file anywhere, the name randomly, enter Y and then line, save the file, the file modified to the bat format.
Pscp.exe has a redirect command, we can redirect to the new bat file, the modified code is as follows A.csv is a random file used for testing
- Echo "Start uploading Files"
- Pscp-l name-pw password-r h:/a.csv name@ip:/usr/local/beta < H:/confirm.bat
- echo "Upload file succeeded"
- Exit
Rebuild projects to build success
This file was also found under Linux-specified folders
Jenkins---Build project jar package on Windows upload to Linux