Skip to content

Commit

Permalink
test with Heliosearch solr distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
apatrida committed Aug 28, 2015
1 parent 592531d commit 63bde67
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/main/kotlin/org/bremeld/solr/undertow/SolrUndertow.kt
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,12 @@ public class Server(cfgLoader: ServerConfigLoader) {
val rootDir = Files.newDirectoryStream(checkRootOfZip).firstOrNull()
if (rootDir != null) {
val firstLevelDir = rootDir.getName(0).toString().mustNotStartWith('/').mustNotEndWith('/')
val checkInnerWarFilename = "/${firstLevelDir}/server/webapps/solr.war"
val checkInnerWar = checkZipFs.getPath(checkInnerWarFilename)
if (checkInnerWar.exists()) {
val checkInnerWar = checkZipFs.getPath("/${firstLevelDir}/server/webapps/solr.war")
val checkOldInnerWar = checkZipFs.getPath("/${firstLevelDir}/example/webapps/solr.war")
val correctWar = if (checkInnerWar.exists()) { checkInnerWar } else { if (checkOldInnerWar.exists()) checkOldInnerWar else null }
if (correctWar != null) {
val tempWar = tempDirThisSolr.resolve("extracted-solr.war")
Files.copy(checkInnerWar, tempWar, StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.COPY_ATTRIBUTES)
Files.copy(correctWar, tempWar, StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.COPY_ATTRIBUTES)
val warUri = URI("jar:file", tempWar.toString().mustStartWith('/'), null)

val warJarFs = try {
Expand Down
1 change: 1 addition & 0 deletions test-data/solr-standalone/solr-temp/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/4*/
/5*/
/hs_*/
11 changes: 11 additions & 0 deletions test-data/solr-standalone/standalone-hs_0.09.from.zip.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
solr.undertow: {
httpClusterPort: 8983
solrHome: "./solr-home"
solrLogs: "./solr-logs"
tempDir: "./solr-temp"
solrVersion: "hs_0.09"
solrWarFile: ../solr-wars/solr-${solr.undertow.solrVersion}.zip
shutdown: {
password: "diediedie"
}
}

0 comments on commit 63bde67

Please sign in to comment.