2009-06-22 55 views
-1

我使用螞蟻jsch-1.6.5和jsch-0.1.41和常規-1.6.3(其使用螞蟻1.7.1)Ant Sshexec輸出被阻塞?

new AntBuilder().sequential{ 

def user = "user", pass = "pass", host = "host" 

    echo "echo 1" 
    sshexec(
     host:host ,username:user, password:pass, verbose:true, trust:true , 
     command:"touch 1.txt" 
    ) 

    echo "echo 2" 
    sshexec(
     host: host ,username:user, password:pass, verbose:true, trust:true , 
     command:"touch 2.txt" 
    ) 
} 

我只能看到在 「回聲1」 1.txt和2.txt都成功創建時的輸出。看來在第一個sshexec之後,輸出被阻塞了。

有什麼辦法解決這個問題?

回答