Skip to content

Commit 9d68b63

Browse files
committed
Fix hdfs fixture shadow tasks
there was a change in behaviour in the shadow jar implementation with the version update
1 parent 33ea42f commit 9d68b63

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/fixtures/hdfs-fixture/build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ tasks.named("shadowJar").configure {
148148
relocate("org.apache.hadoop", "fixture.hdfs3.org.apache.hadoop") {
149149
exclude "org.apache.hadoop.hdfs.protocol.ClientProtocol"
150150
exclude "org.apache.hadoop.ipc.StandbyException"
151+
exclude "org.apache.hadoop.application-classloader.properties"
151152
}
152153
configurations.add(project.configurations.hdfs3)
153154
}
@@ -156,6 +157,7 @@ def hdfs2Jar = tasks.register("hdfs2jar", ShadowJar) {
156157
relocate("org.apache.hadoop", "fixture.hdfs2.org.apache.hadoop") {
157158
exclude "org.apache.hadoop.hdfs.protocol.ClientProtocol"
158159
exclude "org.apache.hadoop.ipc.StandbyException"
160+
exclude "org.apache.hadoop.application-classloader.properties"
159161
}
160162
archiveClassifier.set("hdfs2")
161163
from sourceSets.main.output
@@ -173,6 +175,10 @@ tasks.withType(ShadowJar).configureEach {
173175
exclude(dependency('com.fasterxml.jackson.core:.*:.*'))
174176
}
175177

178+
filesMatching("META-INF/services/**") {
179+
duplicatesStrategy = DuplicatesStrategy.INCLUDE // Or something else.
180+
}
181+
176182
transform(org.elasticsearch.gradle.internal.shadow.XmlClassRelocationTransformer.class) {
177183
resource = "core-default.xml"
178184
enabled = true

0 commit comments

Comments
 (0)