| /* |
| * 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. |
| */ |
| |
| // This project puts together a "distribution", assembling dependencies from |
| // various other projects. |
| |
| plugins { |
| id 'base' |
| id 'distribution' |
| } |
| |
| description = 'Solr distribution packaging' |
| |
| ext { |
| distDir = file("$buildDir/solr-${version}") |
| devDir = file("$buildDir/dev") |
| } |
| |
| configurations { |
| distSolr { |
| transitive = false |
| } |
| distSolrj |
| contrib |
| example |
| server |
| docs |
| } |
| |
| dependencies { |
| distSolrj project(":solr:solrj") |
| |
| [":solr:contrib:analysis-extras", |
| ":solr:contrib:analytics", |
| ":solr:contrib:blob-directory", |
| ":solr:contrib:extraction", |
| ":solr:contrib:clustering", |
| ":solr:contrib:jaegertracer-configurator", |
| ":solr:contrib:langid", |
| ":solr:contrib:ltr", |
| ":solr:contrib:prometheus-exporter", |
| ].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") |
| |
| // Copy files from documentation output |
| docs project(path: ':solr:documentation', configuration: 'minimalSite') |
| } |
| |
| distributions { |
| main { |
| distributionBaseName = 'solr' |
| contents { |
| // TODO: This is missing module README files, as compared to 8x |
| |
| // Manually correct posix permissions (matters when packaging on Windows). |
| filesMatching([ |
| "**/*.sh", |
| "**/bin/post", |
| "**/bin/postlogs", |
| "**/bin/solr", |
| "**/bin/init.d/solr", |
| "**/bin/solr-exporter", |
| ]) { copy -> |
| copy.setMode(0755) |
| } |
| |
| from(project(":solr").projectDir, { |
| include "bin/**" |
| include "licenses/**" |
| exclude "licenses/README.committers.txt" |
| include "CHANGES.txt" |
| include "LICENSE.txt" |
| include "NOTICE.txt" |
| include "README.md" |
| }) |
| |
| 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" |
| }) |
| |
| from(configurations.docs, { |
| into "docs" |
| }) |
| } |
| } |
| } |
| |
| installDist { |
| into distDir |
| } |
| |
| task dev(type: Copy) { |
| description "Assemble Solr distribution into 'development' folder at ${devDir}" |
| group "build" |
| |
| from installDist.outputs |
| into devDir |
| } |
| |
| assemble.dependsOn installDist |