Problème d'attente de fin de process
Bonjour a tous,
j'ai une méthode qui doit faire des dizaines de SVN checkout.
J'effectue ces checkout via un Runtime.exe et j'attend la fin du process externe via un Process.waitFor .
Malheureusement le waitFor ne fini jamais.
Avez vous une idée du problème ?
Je vous remercie par avance pour votre aide.
PS: Le source de la methode
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
private static void checkout(ArrayList<String> svnAllUrl, File workingDir) {
if ( workingDir.exists() && workingDir.isFile() ) {
System.err.println("-------------------------------------------------");
System.err.println("-- Error not a directory : " + workingDir.getAbsolutePath());
System.err.println("-------------------------------------------------");
System.exit(-1);
}
if ( !workingDir.exists() )
workingDir.mkdirs();
Runtime runtime = Runtime.getRuntime();
for ( String svnUrl : svnAllUrl ) {
String[] cmdarray = { "svn", "checkout", svnUrl };
try {
System.out.println("-- Checkout: " + svnUrl);
Process p = runtime.exec(cmdarray, null, workingDir);
p.waitFor();
}
catch ( IOException | InterruptedException e ) {
e.printStackTrace();
}
}
} |