forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgard...@apache.org
Subject svn commit: r170901 - /forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/job/ForrestBuilder.java /forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/job/ForrestManager.java
Date Thu, 19 May 2005 10:07:17 GMT
Author: rgardler
Date: Thu May 19 03:07:15 2005
New Revision: 170901

URL: http://svn.apache.org/viewcvs?rev=170901&view=rev
Log:
enable building of the site using a specified skin (defaults to plain-dev)

Modified:
    forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/job/ForrestBuilder.java
    forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/job/ForrestManager.java

Modified: forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/job/ForrestBuilder.java
URL: http://svn.apache.org/viewcvs/forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/job/ForrestBuilder.java?rev=170901&r1=170900&r2=170901&view=diff
==============================================================================
--- forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/job/ForrestBuilder.java (original)
+++ forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/job/ForrestBuilder.java Thu
May 19 03:07:15 2005
@@ -33,17 +33,29 @@
 	 * Logger for this class
 	 */
 	protected static final Logger logger = Logger.getLogger(ForrestBuilder.class);
+	/** The name of the skin to use. If null, the value in forrest.properties will be used.
*/
+    private String skinName;
 	
 	/**
-	 * Create a Forrest runner that will run a JEtty server on a given directory
+	 * Create a Forrest builder that will build the default
+	 * site configuration.
 	 * @param workingDir - the working directory for the command
 	 */
 	protected ForrestBuilder(String workingDir) {
 		super("Forrest Runner");
-		
 		this.workingDir = workingDir;
 	}
-	
+
+	/**
+	 * Create a Forrest builder that will build the 
+	 * site using the indicated skin.
+	 * @param workingDir - the working directory for the command
+	 */
+	protected ForrestBuilder(String workingDir, String skinName) {
+		super("Forrest Runner");
+		this.workingDir = workingDir;
+		this.skinName = skinName;
+	}
 	/* (non-Javadoc)
 	 * @see java.lang.Runnable#run()
 	 */
@@ -59,6 +71,10 @@
 		sb.append(workingDir);
 		sb.append(" -Dbasedir=");
 		sb.append(fhome + File.separatorChar + "main");
+		if (this.skinName != null) {
+			sb.append(" -Dproject.skin=");
+			sb.append("plain-dev");
+		}
 		sb.append(" site");
         status = runAnt(monitor, sb.toString());
 		return status;

Modified: forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/job/ForrestManager.java
URL: http://svn.apache.org/viewcvs/forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/job/ForrestManager.java?rev=170901&r1=170900&r2=170901&view=diff
==============================================================================
--- forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/job/ForrestManager.java (original)
+++ forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/job/ForrestManager.java Thu
May 19 03:07:15 2005
@@ -39,17 +39,25 @@
  * Manages instances of Forrest that are running on the local server.
  */
 public class ForrestManager {
-	/**
+    /** Name of the skin to use for building the site without navigation */ 
+	private static final String SKIN_PLAIN = "plain-dev";
+    /**
 	 * Logger for this class
 	 */
 	private static final Logger logger = Logger.getLogger(ForrestManager.class);
 
+	/** The command for building the static site */
 	public static final String COMMAND_BUILD = "site";
 
+	/** The command for running the site server */
 	public static final String COMMAND_START = "run";
 
+	/** The command for stopping the site server */
 	public static final String COMMAND_STOP = "stop";
 
+	/** The command for building the site in HTML with no navigation */
+	public static final String COMMAND_BUILD_PLAIN = "buildPlain";
+	
 	private static final int UNKOWN_COMMAND = 0;
 
 	private static final int BUILD = 1;
@@ -167,6 +175,8 @@
 			theJob = new ForrestRunner(workingDir);
 		} else if (cmd.equals(COMMAND_BUILD)) {
 			theJob = new ForrestBuilder(workingDir);
+		} else if (cmd.equals(COMMAND_BUILD_PLAIN)) {
+			theJob = new ForrestBuilder(workingDir, SKIN_PLAIN);
 		} else {
 			theJob = null;
 		}



Mime
View raw message