Skip to content

Commit f303ca6

Browse files
committed
Build: Omit dependency licenses check for elasticsearch deps (#28304)
Sometimes modules/plugins depend on locally built elasticsearch jars. This means not only that the jar is constantly changing (so no need for a sha check), but also that the license falls under the Elasticsearch license, and there is no need to keep another copy. This commit updates the dependencies checked by dependencyLicenses to exclude those that are built by elasticsearch.
1 parent 47f367d commit f303ca6

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,10 @@ class BuildPlugin implements Plugin<Project> {
659659
Task precommit = PrecommitTasks.create(project, true)
660660
project.check.dependsOn(precommit)
661661
project.test.mustRunAfter(precommit)
662-
project.dependencyLicenses.dependencies = project.configurations.runtime - project.configurations.provided
662+
// only require dependency licenses for non-elasticsearch deps
663+
project.dependencyLicenses.dependencies = project.configurations.runtime.fileCollection {
664+
it.group.startsWith('org.elasticsearch') == false
665+
} - project.configurations.provided
663666
}
664667

665668
private static configureDependenciesInfo(Project project) {

modules/reindex/build.gradle

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,6 @@ dependencies {
5252
testCompile project(path: ':modules:parent-join', configuration: 'runtime')
5353
}
5454

55-
dependencyLicenses {
56-
// Don't check the client's license. We know it.
57-
dependencies = project.configurations.runtime.fileCollection {
58-
it.group.startsWith('org.elasticsearch') == false
59-
} - project.configurations.provided
60-
}
61-
6255
thirdPartyAudit.excludes = [
6356
// Commons logging
6457
'javax.servlet.ServletContextEvent',

0 commit comments

Comments
 (0)