Index: metacat-index/src/test/java/edu/ucsb/nceas/metacat/index/SolrIndexIT.java
===================================================================
--- metacat-index/src/test/java/edu/ucsb/nceas/metacat/index/SolrIndexIT.java	(revision 7589)
+++ metacat-index/src/test/java/edu/ucsb/nceas/metacat/index/SolrIndexIT.java	(revision 7590)
@@ -13,18 +13,17 @@
 
 
 
-import org.apache.commons.io.FileUtils;
 import org.apache.solr.client.solrj.SolrServer;
 import org.apache.solr.client.solrj.SolrServerException;
 import org.apache.solr.client.solrj.embedded.EmbeddedSolrServer;
 import org.apache.solr.client.solrj.response.QueryResponse;
-import org.apache.solr.common.SolrDocument;
-import org.apache.solr.common.SolrDocumentList;
 import org.apache.solr.common.params.SolrParams;
 import org.apache.solr.core.CoreContainer;
 import org.apache.solr.servlet.SolrRequestParsers;
+import org.dataone.configuration.Settings;
 import org.dataone.service.types.v1.SystemMetadata;
 import org.dataone.service.util.TypeMarshaller;
+import org.junit.Before;
 import org.junit.Test;
 import org.xml.sax.SAXException;
 
@@ -36,9 +35,15 @@
     private static final String EMLUPDATEFILEPATH = "src/test/resources/eml-updating-example.xml";
     private static final String id = "urn:uuid:606a19dd-b531-4bf4-b5a5-6d06c3d39098";
     private static final String newId = "urn:uuid:606a19dd-b531-4bf4-b5a5-6d06c3d39099";
-    private static final String SOLRHOME = "solr-home";
-    private static final String SOLRTESTHOMEPATH = "target/"+SOLRHOME;
+    private static String SOLRTESTHOMEPATH = null;
     
+    /**
+     * 
+     */
+    @Before
+    public void setUp() {
+    	SOLRTESTHOMEPATH = Settings.getConfiguration().getString("solr.homeDir");
+    }
     
     /**
      * Test building index for an insert.
@@ -45,7 +50,9 @@
      */
     @Test
     public void testInsert() throws Exception {
+    	try {
         SolrIndex solrIndex = generateSolrIndex();
+    	
        //InputStream systemInputStream = new FileInputStream(new File(SYSTEMMETAFILEPATH));
        SystemMetadata systemMetadata = TypeMarshaller.unmarshalTypeFromFile(SystemMetadata.class, SYSTEMMETAFILEPATH);
        InputStream emlInputStream = new FileInputStream(new File(EMLFILEPATH));    
@@ -52,6 +59,9 @@
        solrIndex.insert(id, systemMetadata, emlInputStream);
        String result = doQuery(solrIndex.getSolrServer());
        assertTrue(result.contains("version1"));
+    	} catch (Exception e) {
+    		e.printStackTrace();
+    	}
     }
     
     /**
@@ -128,25 +138,13 @@
      * Generate a test solr server
      */
     private SolrServer generateSolrServer() throws IOException, ParserConfigurationException, SAXException {
-        createSolrHome();
-        System.setProperty(SolrIndex.SOLRHOME, SOLRTESTHOMEPATH);
-        //System.out.println("====="+"/Users/tao/projects/metacat-index/"+SOLRTESTHOMEPATH);
-        CoreContainer.Initializer init = new CoreContainer.Initializer();
-        CoreContainer c = init.initialize();
+        //createSolrHome();
+        File configFile = new File(SOLRTESTHOMEPATH, "solr.xml");
+        CoreContainer c = new CoreContainer(SOLRTESTHOMEPATH, configFile);
+        c.load(SOLRTESTHOMEPATH, configFile);
         SolrServer solrServer = new EmbeddedSolrServer(c, "collection1");
         return solrServer;
     }
     
-    /*
-     * Create a solr home directory
-     */
-    private void createSolrHome() throws IOException {
-        File solrHomeTestDir =  new File(SOLRTESTHOMEPATH);
-        solrHomeTestDir.mkdir();
-        File solrData = new File(SOLRTESTHOMEPATH+"/data");
-        solrData.mkdir();
-        File solr_home_source_dir = new File("src/main/resources/"+SOLRHOME);
-        FileUtils.copyDirectory(solr_home_source_dir, solrHomeTestDir);
-    }
 }
 
Index: metacat-index/src/test/resources/org/dataone/configuration/test.properties
===================================================================
--- metacat-index/src/test/resources/org/dataone/configuration/test.properties	(revision 7589)
+++ metacat-index/src/test/resources/org/dataone/configuration/test.properties	(revision 7590)
@@ -1 +1,2 @@
-dataone.hazelcast.configFilePath=../lib/hazelcast.xml
\ No newline at end of file
+dataone.hazelcast.configFilePath=../lib/hazelcast.xml
+solr.homeDir=target/classes/solr-home
\ No newline at end of file
Index: metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/SolrIndex.java
===================================================================
--- metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/SolrIndex.java	(revision 7589)
+++ metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/SolrIndex.java	(revision 7590)
@@ -27,6 +27,7 @@
 package edu.ucsb.nceas.metacat.index;
 
 import java.io.ByteArrayInputStream;
+import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.ArrayList;
@@ -76,13 +77,8 @@
  */
 public class SolrIndex {
     
-    
-    
-    public static final String SOLRHOME = "solr.solr.home";
     public static final String SOLRHOMEPROPERTYNAME = "solr.homeDir";
     
-    private static final String SOLRINDEXWEBCONTEXT = "metacat-index";
-    private static final String SOLRSERVERNAME = "metacat-core";
     //private static final String DEFAULTSOLRHOMEPATH = "/Users/tao/Downloads/apache-solr-3.4.0/example/solr";
     
     private List<IDocumentSubprocessor> subprocessors = null;
@@ -126,19 +122,9 @@
         String solrHomeDir = null;
         solrHomeDir = Settings.getConfiguration().getString(SOLRHOMEPROPERTYNAME);
         log.info("========================= the solr home from the metacat.properties is "+solrHomeDir);
-        if(solrHomeDir == null || solrHomeDir.trim().equals("")) {
-            String deployDir = Settings.getConfiguration().getString("application.deployDir");
-            if(deployDir == null || deployDir.trim().equals("")) {
-                solrHomeDir =  SOLRINDEXWEBCONTEXT+"/WEB-INF/classes/solr-home";
-            } else {
-                solrHomeDir =  deployDir + "/" +SOLRINDEXWEBCONTEXT+"/WEB-INF/classes/solr-home";
-            }
-            
-        }
-        log.info("==========================================final solr home is "+solrHomeDir);
-        System.setProperty(SOLRHOME, solrHomeDir);
-        CoreContainer.Initializer init = new CoreContainer.Initializer();
-        CoreContainer c = init.initialize();
+        File configFile = new File(solrHomeDir, "solr.xml");
+        CoreContainer c = new CoreContainer(solrHomeDir, configFile);
+        c.load(solrHomeDir, configFile);
         solrServer = new EmbeddedSolrServer(c, "collection1");
     }
     
