2020-01-27 12:05:34 -05:00
|
|
|
/*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed with
|
|
|
|
* this work for additional information regarding copyright ownership.
|
|
|
|
* The ASF licenses this file to You under the Apache License, Version 2.0
|
|
|
|
* (the "License"); you may not use this file except in compliance with
|
|
|
|
* the License. You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2019-12-02 09:34:57 -05:00
|
|
|
// This project puts together a "distribution", assembling dependencies from
|
|
|
|
// various other projects.
|
|
|
|
|
|
|
|
plugins {
|
|
|
|
id 'base'
|
|
|
|
}
|
|
|
|
|
2020-05-17 08:46:26 -04:00
|
|
|
description = 'Solr packaging'
|
|
|
|
|
2019-12-02 09:34:57 -05:00
|
|
|
ext {
|
|
|
|
distDir = file("$buildDir/solr-${version}")
|
2020-04-12 10:25:39 -04:00
|
|
|
devDir = file("$buildDir/dev")
|
2019-12-02 09:34:57 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
configurations {
|
|
|
|
distSolr {
|
|
|
|
transitive = false
|
|
|
|
}
|
|
|
|
distSolrj
|
|
|
|
contrib
|
|
|
|
example
|
|
|
|
server
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
distSolrj project(":solr:solrj")
|
|
|
|
|
|
|
|
[":solr:contrib:analysis-extras",
|
|
|
|
":solr:contrib:analytics",
|
|
|
|
":solr:contrib:extraction",
|
|
|
|
":solr:contrib:clustering",
|
|
|
|
":solr:contrib:dataimporthandler",
|
|
|
|
":solr:contrib:dataimporthandler-extras",
|
|
|
|
":solr:contrib:jaegertracer-configurator",
|
|
|
|
":solr:contrib:langid",
|
|
|
|
":solr:contrib:ltr",
|
|
|
|
":solr:contrib:prometheus-exporter",
|
|
|
|
":solr:contrib:velocity",
|
|
|
|
].each { contribName ->
|
|
|
|
distSolr project(contribName)
|
|
|
|
contrib project(path: contribName, configuration: "packaging")
|
|
|
|
}
|
|
|
|
|
|
|
|
distSolr project(":solr:core")
|
|
|
|
distSolr project(":solr:solrj")
|
|
|
|
distSolr project(":solr:test-framework")
|
|
|
|
|
|
|
|
example project(path: ":solr:example", configuration: "packaging")
|
|
|
|
server project(path: ":solr:server", configuration: "packaging")
|
|
|
|
}
|
|
|
|
|
|
|
|
task toDir(type: Sync) {
|
|
|
|
from(project(":solr").projectDir, {
|
|
|
|
include "bin/**"
|
|
|
|
include "licenses/**"
|
|
|
|
include "CHANGES.txt"
|
|
|
|
include "LICENSE.txt"
|
|
|
|
include "NOTICE.txt"
|
2020-04-26 19:43:04 -04:00
|
|
|
include "README.md"
|
2019-12-02 09:34:57 -05:00
|
|
|
})
|
|
|
|
|
|
|
|
from(project(":lucene").projectDir, {
|
|
|
|
include "CHANGES.txt"
|
|
|
|
rename { file -> 'LUCENE_CHANGES.txt' }
|
|
|
|
})
|
|
|
|
|
|
|
|
from(configurations.contrib, {
|
|
|
|
into "contrib"
|
|
|
|
})
|
|
|
|
|
|
|
|
from(configurations.distSolr, {
|
|
|
|
into "dist"
|
|
|
|
})
|
|
|
|
|
|
|
|
from(configurations.distSolrj - configurations.distSolr, {
|
|
|
|
into "dist/solrj-lib"
|
|
|
|
})
|
|
|
|
|
|
|
|
from(configurations.example, {
|
|
|
|
into "example"
|
|
|
|
})
|
|
|
|
|
|
|
|
from(configurations.server, {
|
|
|
|
into "server"
|
|
|
|
})
|
|
|
|
|
|
|
|
// docs/ - TODO: this is assembled via XSLT... leaving out for now.
|
|
|
|
|
|
|
|
into distDir
|
|
|
|
|
|
|
|
doLast {
|
|
|
|
logger.lifecycle "Solr distribution assembled under: ${distDir}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-04-12 10:25:39 -04:00
|
|
|
task dev(type: Copy) {
|
|
|
|
description "Assemble Solr distribution into 'development' folder at ${devDir}"
|
|
|
|
group "build"
|
|
|
|
|
|
|
|
from toDir.outputs
|
|
|
|
into devDir
|
|
|
|
}
|
|
|
|
|
2019-12-02 09:34:57 -05:00
|
|
|
assemble.dependsOn toDir
|
|
|
|
|