Skip to content

Commit a963f7a

Browse files
authored
SOLR-17142: Fix Gradle build sometimes gives spurious "unreferenced license file" warnings (#2676)
1 parent 1818841 commit a963f7a

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

gradle/validation/jar-checks.gradle

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
// 2) notice file
2121
// 3) checksum validation/ generation.
2222

23+
// WARNING: The tasks in this file share internal state between tasks without using files.
24+
// Because of this all tasks here must always execute together, so they cannot define task outputs.
25+
// TODO: Rewrite the internal state to use state files containing the ext.jarInfos and its referencedFiles
26+
2327
import org.apache.commons.codec.digest.DigestUtils
2428

2529
// This should be false only for debugging.
@@ -210,13 +214,6 @@ subprojects {
210214
description = "Validate license and notice files of dependencies"
211215
dependsOn collectJarInfos
212216

213-
def outputFileName = 'validateJarLicenses'
214-
inputs.dir(file(project.rootDir.path + '/solr/licenses'))
215-
.withPropertyName('licenses')
216-
.withPathSensitivity(PathSensitivity.RELATIVE)
217-
outputs.file(layout.buildDirectory.file(outputFileName))
218-
.withPropertyName('validateJarLicensesResult')
219-
220217
doLast {
221218
def errors = []
222219
jarInfos.each { dep ->
@@ -262,8 +259,7 @@ subprojects {
262259
}
263260
}
264261
}
265-
def f = new File(project.buildDir.path + "/" + outputFileName)
266-
f.text = errors
262+
267263
if (errors) {
268264
def msg = "Certain license/ notice files are missing:\n - " + errors.join("\n - ")
269265
if (failOnError) {

solr/CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@ Other Changes
148148

149149
* SOLR-17399: Replace the use of the deprecated java.util.Locale constructor with Locale Builder API. (Sanjay Dutt)
150150

151+
* SOLR-17142: Fix Gradle build sometimes gives spurious "unreferenced license file" warnings. (Uwe Schindler)
152+
151153
================== 9.7.0 ==================
152154
New Features
153155
---------------------

0 commit comments

Comments
 (0)