mirror of https://github.com/apache/lucene.git
SOLR-14847: Create Solr Server TGZ (#1844)
Create new targets for building solr binary release artifacts: gradlew -p solr/packaging distTar distZip Co-authored-by: Houston Putman <houston@apache.org> Co-authored-by: Dawid Weiss <dawid.weiss@carrotsearch.com> Co-authored-by: Mike Drob <mdrob@apache.org>
This commit is contained in:
parent
59d83428bc
commit
14e4edc1e9
|
@ -29,7 +29,8 @@ ls -R build/maven-local/
|
||||||
|
|
||||||
Put together Solr distribution:
|
Put together Solr distribution:
|
||||||
gradlew -p solr/packaging assemble
|
gradlew -p solr/packaging assemble
|
||||||
ls solr/packaging/build/solr-*
|
ls solr/packaging/build/distributions/solr-* # release archives
|
||||||
|
ls solr/packaging/build/solr-* # expanded directory
|
||||||
|
|
||||||
|
|
||||||
Other validation and checks
|
Other validation and checks
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id 'base'
|
id 'base'
|
||||||
|
id 'distribution'
|
||||||
}
|
}
|
||||||
|
|
||||||
description = 'Solr packaging'
|
description = 'Solr packaging'
|
||||||
|
@ -64,58 +65,76 @@ dependencies {
|
||||||
server project(path: ":solr:server", configuration: "packaging")
|
server project(path: ":solr:server", configuration: "packaging")
|
||||||
}
|
}
|
||||||
|
|
||||||
task toDir(type: Sync) {
|
distributions {
|
||||||
from(project(":solr").projectDir, {
|
main {
|
||||||
include "bin/**"
|
distributionBaseName = 'solr'
|
||||||
include "licenses/**"
|
contents {
|
||||||
exclude "licenses/README.committers.txt"
|
// Manually correct posix permissions (matters when packaging on Windows).
|
||||||
include "CHANGES.txt"
|
filesMatching([
|
||||||
include "LICENSE.txt"
|
"**/*.sh",
|
||||||
include "NOTICE.txt"
|
"**/bin/post",
|
||||||
include "README.md"
|
"**/bin/postlogs",
|
||||||
})
|
"**/bin/solr",
|
||||||
|
"**/bin/init.d/solr",
|
||||||
|
"**/bin/solr-exporter",
|
||||||
|
]) {
|
||||||
|
setMode 0755
|
||||||
|
}
|
||||||
|
|
||||||
from(project(":lucene").projectDir, {
|
from(project(":solr").projectDir, {
|
||||||
include "CHANGES.txt"
|
include "bin/**"
|
||||||
rename { file -> 'LUCENE_CHANGES.txt' }
|
include "licenses/**"
|
||||||
})
|
exclude "licenses/README.committers.txt"
|
||||||
|
include "CHANGES.txt"
|
||||||
|
include "LICENSE.txt"
|
||||||
|
include "NOTICE.txt"
|
||||||
|
include "README.md"
|
||||||
|
})
|
||||||
|
|
||||||
from(configurations.contrib, {
|
from(project(":lucene").projectDir, {
|
||||||
into "contrib"
|
include "CHANGES.txt"
|
||||||
})
|
rename { file -> 'LUCENE_CHANGES.txt' }
|
||||||
|
})
|
||||||
|
|
||||||
from(configurations.distSolr, {
|
from(configurations.contrib, {
|
||||||
into "dist"
|
into "contrib"
|
||||||
})
|
})
|
||||||
|
|
||||||
from(configurations.distSolrj - configurations.distSolr, {
|
from(configurations.distSolr, {
|
||||||
into "dist/solrj-lib"
|
into "dist"
|
||||||
})
|
})
|
||||||
|
|
||||||
from(configurations.example, {
|
from(configurations.distSolrj - configurations.distSolr, {
|
||||||
into "example"
|
into "dist/solrj-lib"
|
||||||
})
|
})
|
||||||
|
|
||||||
from(configurations.server, {
|
from(configurations.example, {
|
||||||
into "server"
|
into "example"
|
||||||
})
|
})
|
||||||
|
|
||||||
// docs/ - TODO: this is assembled via XSLT... leaving out for now.
|
from(configurations.server, {
|
||||||
|
into "server"
|
||||||
|
})
|
||||||
|
|
||||||
into distDir
|
// docs/ - TODO: this is assembled via XSLT... leaving out for now.
|
||||||
|
}
|
||||||
doLast {
|
|
||||||
logger.lifecycle "Solr distribution assembled under: ${distDir}"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
distTar {
|
||||||
|
compression = Compression.GZIP
|
||||||
|
}
|
||||||
|
|
||||||
|
installDist {
|
||||||
|
into distDir
|
||||||
|
}
|
||||||
|
|
||||||
task dev(type: Copy) {
|
task dev(type: Copy) {
|
||||||
description "Assemble Solr distribution into 'development' folder at ${devDir}"
|
description "Assemble Solr distribution into 'development' folder at ${devDir}"
|
||||||
group "build"
|
group "build"
|
||||||
|
|
||||||
from toDir.outputs
|
from installDist.outputs
|
||||||
into devDir
|
into devDir
|
||||||
}
|
}
|
||||||
|
|
||||||
assemble.dependsOn toDir
|
assemble.dependsOn installDist
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue