Skip to content

Commit

Permalink
Fix Shadow JAR dependency publication (opensearch-project#11369)
Browse files Browse the repository at this point in the history
Signed-off-by: Andriy Redko <[email protected]>
(cherry picked from commit 7aa65b4)
  • Loading branch information
reta committed Nov 29, 2023
1 parent f7c8dd3 commit 32a8695
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 25 deletions.
25 changes: 0 additions & 25 deletions modules/lang-painless/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import com.github.jengelman.gradle.plugins.shadow.ShadowBasePlugin

apply plugin: 'opensearch.validate-rest-spec'
apply plugin: 'opensearch.yaml-rest-test'
apply plugin: 'com.github.johnrengelman.shadow'

opensearchplugin {
description 'An easy, safe and fast scripting language for OpenSearch'
Expand Down Expand Up @@ -62,30 +61,6 @@ dependencies {
api project('spi')
}

test {
doFirst {
test.classpath -= project.files(project.tasks.named('shadowJar'))
test.classpath -= project.configurations.getByName(ShadowBasePlugin.CONFIGURATION_NAME)
test.classpath += project.extensions.getByType(SourceSetContainer).getByName(SourceSet.MAIN_SOURCE_SET_NAME).runtimeClasspath
}
}

shadowJar {
archiveClassifier.set('')
relocate 'org.objectweb', 'org.opensearch.repackage.org.objectweb'
dependencies {
include(dependency("org.ow2.asm:asm:${versions.asm}"))
include(dependency("org.ow2.asm:asm-util:${versions.asm}"))
include(dependency("org.ow2.asm:asm-tree:${versions.asm}"))
include(dependency("org.ow2.asm:asm-commons:${versions.asm}"))
include(dependency("org.ow2.asm:asm-analysis:${versions.asm}"))
}
}

tasks.validateNebulaPom.dependsOn tasks.generatePomFileForShadowPublication
tasks.validateShadowPom.dependsOn tasks.generatePomFileForNebulaPublication
tasks.withType(AbstractPublishToMaven)*.dependsOn "generatePomFileForShadowPublication", "generatePomFileForNebulaPublication"

tasks.named("dependencyLicenses").configure {
mapping from: /asm-.*/, to: 'asm'
}
Expand Down
1 change: 1 addition & 0 deletions release-notes/opensearch.release-notes-2.11.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
### Fixed
- [BUG] Disable sort optimization for HALF_FLOAT ([#10999](https://github.com/opensearch-project/OpenSearch/pull/10999))
- Adding version condition while adding geoshape doc values to the index, to ensure backward compatibility.([#11095](https://github.com/opensearch-project/OpenSearch/pull/11095))
- Remove shadowJar from `lang-painless` module publication ([#11369](https://github.com/opensearch-project/OpenSearch/issues/11369))

0 comments on commit 32a8695

Please sign in to comment.