Move licenses for core jar to core directory (#21383)
All plugins currently have their own licenses dir for the dependencyLicenses task, but core disables this and has the check inside distribution. This may have been better for maven, but for gradle it makes more sense to just use the dependencyLicenses task that automatically exists inside :core, and remove the hacked up version that is inside distribution.
This commit is contained in:
parent
7a2c984bcc
commit
562a30d3c6
|
@ -257,8 +257,10 @@ thirdPartyAudit.excludes = [
|
|||
'org.noggit.JSONParser',
|
||||
]
|
||||
|
||||
// dependency license are currently checked in distribution
|
||||
dependencyLicenses.enabled = false
|
||||
dependencyLicenses {
|
||||
mapping from: /lucene-.*/, to: 'lucene'
|
||||
mapping from: /jackson-.*/, to: 'jackson'
|
||||
}
|
||||
|
||||
if (isEclipse == false || project.path == ":core-tests") {
|
||||
task integTest(type: RandomizedTestingTask,
|
||||
|
|
|
@ -39,10 +39,6 @@ buildscript {
|
|||
}
|
||||
}
|
||||
|
||||
// this is common configuration for distributions, but we also add it here for the license check to use
|
||||
ext.dependencyFiles = project(':core').configurations.runtime.copyRecursive()
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
* Modules *
|
||||
*****************************************************************************/
|
||||
|
@ -146,7 +142,7 @@ subprojects {
|
|||
libFiles = copySpec {
|
||||
into 'lib'
|
||||
from project(':core').jar
|
||||
from project(':distribution').dependencyFiles
|
||||
from project(':core').configurations.runtime
|
||||
}
|
||||
|
||||
modulesFiles = copySpec {
|
||||
|
@ -438,19 +434,6 @@ configure(subprojects.findAll { ['deb', 'rpm'].contains(it.name) }) {
|
|||
}
|
||||
}
|
||||
|
||||
// TODO: dependency checks should really be when building the jar itself, which would remove the need
|
||||
// for this hackery and instead we can do this inside the BuildPlugin
|
||||
task dependencyLicenses(type: DependencyLicensesTask) {
|
||||
dependsOn = [dependencyFiles]
|
||||
dependencies = dependencyFiles
|
||||
mapping from: /lucene-.*/, to: 'lucene'
|
||||
mapping from: /jackson-.*/, to: 'jackson'
|
||||
}
|
||||
task check(group: 'Verification', description: 'Runs all checks.', dependsOn: dependencyLicenses) {} // dummy task!
|
||||
task updateShas(type: UpdateShasTask) {
|
||||
parentTask = dependencyLicenses
|
||||
}
|
||||
|
||||
task run(type: RunTask) {
|
||||
distribution = 'zip'
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
|
||||
task buildRpm(type: Rpm) {
|
||||
dependsOn dependencyFiles, preparePackagingFiles
|
||||
dependsOn preparePackagingFiles
|
||||
baseName 'elasticsearch' // this is what pom generation uses for artifactId
|
||||
// Follow elasticsearch's rpm file naming convention
|
||||
archiveName "${packageName}-${project.version}.rpm"
|
||||
|
|
Loading…
Reference in New Issue