forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgard...@apache.org
Subject svn commit: r481110 - /forrest/trunk/whiteboard/forrest2/core/src/core/org/apache/forrest/cli/CLI.java
Date Thu, 30 Nov 2006 23:45:39 GMT
Author: rgardler
Date: Thu Nov 30 15:45:37 2006
New Revision: 481110

URL: http://svn.apache.org/viewvc?view=rev&rev=481110
Log:
Make build directories if they don't exist.
Change build directory to a more specific one

Modified:
    forrest/trunk/whiteboard/forrest2/core/src/core/org/apache/forrest/cli/CLI.java

Modified: forrest/trunk/whiteboard/forrest2/core/src/core/org/apache/forrest/cli/CLI.java
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/forrest2/core/src/core/org/apache/forrest/cli/CLI.java?view=diff&rev=481110&r1=481109&r2=481110
==============================================================================
--- forrest/trunk/whiteboard/forrest2/core/src/core/org/apache/forrest/cli/CLI.java (original)
+++ forrest/trunk/whiteboard/forrest2/core/src/core/org/apache/forrest/cli/CLI.java Thu Nov
30 15:45:37 2006
@@ -111,10 +111,18 @@
 				+ " is:\n");
 		System.out.println(doc.getContentAsString());
 		
-		File outFile = new File("build\\" + doc.getPath());
+		String path = getContentBuildPath();
+		File outPath = new File(path);
+		outPath.mkdirs();
+		File outFile = new File(path + doc.getPath());
 		FileWriter writer = new FileWriter(outFile);
 		writer.write(doc.getContentAsString());
 		writer.close();
+		log.debug("Written document to " + path + doc.getPath());
+	}
+
+	private static String getContentBuildPath() {
+		return System.getProperty("user.dir") + "/build/content/";
 	}
 
 	/**



Mime
View raw message