mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-22 22:27:47 -04:00
The libs projects are configured to all begin with `elasticsearch-`. While this is desireable for the artifacts to contain this consistent prefix, it means the project names don't match up with their directories. Additionally, it creates complexities for subproject naming that must be manually adjusted. This commit adjusts the project names for those under libs to be their directory names. The resulting artifacts for these libs are kept the same, all beginning with `elasticsearch-`.
48 lines
1.5 KiB
Groovy
48 lines
1.5 KiB
Groovy
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the "Elastic License
|
|
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
|
|
* Public License v 1"; you may not use this file except in compliance with, at
|
|
* your election, the "Elastic License 2.0", the "GNU Affero General Public
|
|
* License v3.0 only", or the "Server Side Public License, v 1".
|
|
*/
|
|
|
|
configure(childProjects.values()) {
|
|
|
|
apply plugin: 'base'
|
|
|
|
/*
|
|
* Although these libs are local to Elasticsearch, they can conflict with other similarly
|
|
* named libraries when downloaded into a single directory via maven. Here we set the
|
|
* name of all libs to begin with the "elasticsearch-" prefix. Additionally, subprojects
|
|
* of libs begin with their parents artifactId.
|
|
*/
|
|
def baseProject = project
|
|
def baseArtifactId = "elasticsearch-${it.name}"
|
|
base {
|
|
archivesName = baseArtifactId
|
|
}
|
|
subprojects {
|
|
apply plugin: 'base'
|
|
|
|
def subArtifactId = baseArtifactId
|
|
def currentProject = project
|
|
while (currentProject != baseProject) {
|
|
subArtifactId += "-${currentProject.name}"
|
|
currentProject = currentProject.parent
|
|
}
|
|
base {
|
|
archivesName = subArtifactId
|
|
}
|
|
}
|
|
|
|
// log4j is a hack, and not really a full elasticsearch built jar
|
|
if (project.name != 'log4j') {
|
|
|
|
/*
|
|
* All subprojects are java projects using Elasticsearch's standard build
|
|
* tools.
|
|
*/
|
|
apply plugin: 'elasticsearch.build'
|
|
}
|
|
}
|