工具类

来源:互联网 发布:阿里小号 知乎 编辑:程序博客网 时间:2024/05/19 06:14

import java.io.IOException;

//将svn上的压缩包下载到本地指定路径下
public class SvnCheckoutTvmcBase {

 
 public static void getPath(String[] path,String toPath){
  try{
  for(int i=0;i<path.length;i++){
   String cmdStr = "cmd /c svn export"+" "+path[i]+" "+toPath+" "+"--username 用户名 --password 密码 --non-interactive --trust-server-cert";
         Runtime.getRuntime().exec(cmdStr);
  }
  }catch(IOException e){
   e.printStackTrace();
  }
 }
 
 public static void main(String[] args) {
 
     System.out.println("共享成果物压缩包的详细路径:args[0]=="+args[0]);
     System.out.println("将共享成果物压缩包下载到该路径下:args[1]=="+args[1]);
   
  String path[]=args[0].split(",");
  String tPath=args[1];
  getPath(path,tPath);
 }
}

0 0
原创粉丝点击