FileUtils.copyDirectory(new File(unpackedSolrHome, "conf"), confDir);
Properties props = new Properties();
props.setProperty("solr.data.dir", dataDir);
props.setProperty("solr.home", solrHome.toString());
SolrResourceLoader loader = new SolrResourceLoader(solrHome.toString(), null, props);
LOG.info(String
.format(
"Constructed instance information solr.home %s (%s), instance dir %s, conf dir %s, writing index to temporary directory %s, with permdir %s",
solrHome, solrHome.toUri(), loader.getInstanceDir(), loader.getConfigDir(), dataDir, perm));
CoreContainer container = new CoreContainer(loader);
CoreDescriptor descr = new CoreDescriptor(container, "core1", solrHome.toString());
descr.setDataDir(dataDir);
descr.setCoreProperties(props);
core = container.create(descr);