Index: main/trunk/gli/src/org/greenstone/gatherer/Gatherer.java
===================================================================
--- main/trunk/gli/src/org/greenstone/gatherer/Gatherer.java	(revision 29221)
+++ main/trunk/gli/src/org/greenstone/gatherer/Gatherer.java	(revision 29222)
@@ -1041,4 +1041,11 @@
 	// used to send reload coll messages to the tomcat server
 	static public void configGS3Server(String site, String command) {
+
+	    // Do not do configGS3Server for a GS3 solr collection. Not at present at least, when we're stopping
+	    // and starting the GS3 server from GLI for solr cols, since this function clears the solr.xml file.
+	    if(Gatherer.c_man.isSolrCollection()) {
+		return;
+	    }
+
 		if (Configuration.library_url == null){
 			System.out.println("Error: you have not provided the Greenstone Library address.");  
Index: main/trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java
===================================================================
--- main/trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java	(revision 29221)
+++ main/trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java	(revision 29222)
@@ -79,4 +79,6 @@
 import org.w3c.dom.*;
 
+import org.greenstone.gatherer.util.GS3ServerThread;
+
 /** This class manages many aspects of the collection, from its creation via scripts, data access via methods and its importing and building into the final collection. It is also responsible for firing appropriate event when significant changes have occured within the collection, and for creating a new metadata set manager as necessary.
  * @author John Thompson
@@ -215,4 +217,11 @@
 	command_parts_list.add("-language");
 	command_parts_list.add(Configuration.getLanguage());
+
+	// For now, for solr collections, we pass in -activate
+	// but GLI won't do moving building to index
+	
+	if(CollectionManager.isSolrCollection()) {
+	    command_parts_list.add("-activate");
+	}
 
 	if(Gatherer.GS3) {
@@ -1734,5 +1743,27 @@
             
         if ( CollectionDesignManager.buildcolWasFull() ) {
-	        if(installCollection()) {
+
+	    // No installCollection() for GS3 solr collection: activate will take care of that
+	    // and no call to configGS3Server for solr collection
+	    if(CollectionManager.isSolrCollection()) {
+		
+		DebugStream.println("Solr collection build complete: building already moved to index by activate.pl.");
+		
+		// Finished building,
+		// For now, for a GS3 solr collection, we'd have stopped the GS3 server before building
+		// and will now need to restart it.
+		GS3ServerThread thread = new GS3ServerThread(Configuration.gsdl3_src_path, "restart");
+		thread.start();
+
+		// sleep before returning and doing the configGS3Server: give the GS3 server time to restart	
+		try {
+		    Thread.sleep(5000);
+		} catch(Exception e) {
+		    e.printStackTrace();
+		}
+		
+	    }
+	    
+	    else if(installCollection()) {
 		    // If we have a local library running then ask it to add our newly create collection
 		    if (LocalLibraryServer.isRunning() == true) {
@@ -1987,4 +2018,13 @@
     }
 
+    public static String getBuildType() {
+	String buildType = (new CollectionMeta( CollectionDesignManager.collect_config.getBuildType() )).getValue(CollectionMeta.TEXT);
+	return buildType;
+    }
+
+    public static boolean isSolrCollection() {
+	return (Gatherer.GS3 && CollectionManager.getBuildType().equals("solr"));
+    }
+
 
     /** Install collection by moving its files from building to index after a successful build.
@@ -1999,5 +2039,18 @@
 	}
 
-       
+	if(CollectionManager.isSolrCollection()) {
+	    // No installCollection() for GS3 solr collection: activate will take care of that
+	    DebugStream.println("Solr collection build complete: building already moved to index by activate.pl.");
+
+	    // Finished building,
+	    // For now, for a GS3 solr collection, we'd have stopped the GS3 server before building
+	    // and will now need to restart it.
+	    GS3ServerThread thread = new GS3ServerThread(Configuration.gsdl3_src_path, "restart");
+	    thread.start();
+
+	    return true;
+	}
+
+
 	DebugStream.println("Build complete. Moving files.");
 
Index: main/trunk/gli/src/org/greenstone/gatherer/gui/CreatePane.java
===================================================================
--- main/trunk/gli/src/org/greenstone/gatherer/gui/CreatePane.java	(revision 29221)
+++ main/trunk/gli/src/org/greenstone/gatherer/gui/CreatePane.java	(revision 29222)
@@ -63,4 +63,5 @@
 
 import org.greenstone.gatherer.collection.CollectionManager;
+import org.greenstone.gatherer.util.GS3ServerThread;
 
 /** This class provides a GUI view showing some statistics on your current collection, and options for building it. As the collection is built this initial view is replaced with one showing progress bars and a message log of the creation process. This log can be later accessed via the options tree located in the center of the initial pane. This class is also responsible for creating the GShellProgressMonitors that are then attatched to external shell processes, and calling the methods in the CollectionManager for actually importing and building the collection. <br><BR>
@@ -694,4 +695,13 @@
 			*/
                 prepareForBuild();
+
+    	// Starting building,
+	// For now, for a GS3 solr collection, we need to stop the GS3 server before building
+	// and restart it after building is complete. Restart is done in CollectionManager.processComplete()
+	if(CollectionManager.isSolrCollection()) {
+	    GS3ServerThread thread = new GS3ServerThread(Configuration.gsdl3_src_path, "stop");
+	    thread.start();
+	}
+
                 Gatherer.c_man.importCollection(); //This starts the building process.
 			/*
@@ -860,4 +870,15 @@
 	    // Remove the collection lock.
 	    //Gatherer.g_man.lockCollection(false, false);
+
+       	// Cancelling building:
+	// For now, for a GS3 solr collection, we need to stop the GS3 server before building
+	// and restart it after building is complete. If a cancel is pressed during build
+	// then we also restart the GS3 server
+	if(CollectionManager.isSolrCollection()) {
+	    GS3ServerThread thread = new GS3ServerThread(Configuration.gsdl3_src_path, "restart");
+	    thread.start();
+	}
+
+
 	}
     }
Index: main/trunk/gli/src/org/greenstone/gatherer/util/GS3ServerThread.java
===================================================================
--- main/trunk/gli/src/org/greenstone/gatherer/util/GS3ServerThread.java	(revision 29221)
+++ main/trunk/gli/src/org/greenstone/gatherer/util/GS3ServerThread.java	(revision 29222)
@@ -55,4 +55,6 @@
 	try
 	    {
+		///System.err.println("**** GS3 server : " + _ant_command);
+
 		String shellCommand = null;
 		Process p = null;
