[kepler-code] r28805 - in trunk/modules/build-area: src/org/kepler/build/util target
brooks at ecoinformatics.org
brooks at ecoinformatics.org
Mon Oct 17 15:28:38 PDT 2011
Author: brooks
Date: 2011-10-17 15:28:38 -0700 (Mon, 17 Oct 2011)
New Revision: 28805
Modified:
trunk/modules/build-area/src/org/kepler/build/util/CommandLine.java
trunk/modules/build-area/target/kepler-tasks.jar
Log:
Under Windows, if 'ant change-to -Dsuite=kepler' fails because of the svn ssl cert bug, then also print out a command line with forward slashes that will actually work under Cygwin. See http://chess.eecs.berkeley.edu/ptexternal/wiki/Main/Subversion#svnCertficateIsNotIssuedByATrustedAuthority
Modified: trunk/modules/build-area/src/org/kepler/build/util/CommandLine.java
===================================================================
--- trunk/modules/build-area/src/org/kepler/build/util/CommandLine.java 2011-10-17 17:48:30 UTC (rev 28804)
+++ trunk/modules/build-area/src/org/kepler/build/util/CommandLine.java 2011-10-17 22:28:38 UTC (rev 28805)
@@ -98,7 +98,14 @@
{
System.out.print(str + " ");
}
- System.out.println("");
+ System.out.println("");
+ if (System.getProperty("os.name").startsWith("Windows")) {
+ System.out.println("Under Cygwin, use forward slashes:");
+ for(String str : command)
+ {
+ System.out.print(str.replace("\\","/"));
+ }
+ }
return;
}
@@ -180,18 +187,24 @@
*/
private static void printInputStream(InputStream is) throws IOException, CommandLineExecutionException
{
- BufferedReader br = new BufferedReader(new InputStreamReader(is));
- String line = null;
- while ((line = br.readLine()) != null)
- {
- System.out.println(line);
- if(line.startsWith("Error validating server certificate for"))
+ BufferedReader br = null;
+ try {
+ br = new BufferedReader(new InputStreamReader(is));
+ String line = null;
+ while ((line = br.readLine()) != null)
{
+ System.out.println(line);
+ if (line.startsWith("Error validating server certificate for"))
+ {
+ // See http://chess.eecs.berkeley.edu/ptexternal/wiki/Main/Subversion#svnCertficateIsNotIssuedByATrustedAuthority
+ throw new CommandLineExecutionException("SVN server certificate could not be validated.");
+ }
+ }
+ } finally {
+ if (br != null) {
br.close();
- throw new CommandLineExecutionException("SVN server certificate could not be validated.");
}
}
- br.close();
}
/** An exception thrown which the child process encounters an error. */
Modified: trunk/modules/build-area/target/kepler-tasks.jar
===================================================================
(Binary files differ)
More information about the Kepler-cvs
mailing list