Skip to content

Commit 4c981ff

Browse files
committed
[BUILD] Don't shade core artifacts
This commit adds an additioal jar that is shaded and keeps all the artifacts that are used by default on the server-side unshaded. Users that need a shaded jar can now use the `shaded` classifyer to pull the shaded minimized jar in instead. Including the shaded jar in a downstream project looks like this: ```XML <dependency> <groupId>org.elasticsearch</groupId> <artifactId>elasticsearch</artifactId> <classifier>shaded</classifier> </dependency> ```
1 parent 6aa27a1 commit 4c981ff

File tree

3 files changed

+18
-7
lines changed

3 files changed

+18
-7
lines changed

core/pom.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818

1919

2020
<properties>
21-
<!-- testing is currently done unshaded :( -->
22-
<elasticsearch.thirdparty.config>unshaded</elasticsearch.thirdparty.config>
2321
<!-- Properties used for building RPM & DEB packages (see common/packaging.properties) -->
2422
<packaging.elasticsearch.home.dir>/usr/share/elasticsearch</packaging.elasticsearch.home.dir>
2523
<packaging.elasticsearch.bin.dir>/usr/share/elasticsearch/bin</packaging.elasticsearch.bin.dir>
@@ -415,9 +413,12 @@
415413
</execution>
416414
</executions>
417415
<configuration>
418-
<shadeTestJar>true</shadeTestJar>
416+
<shadedArtifactAttached>true</shadedArtifactAttached>
417+
<shadedClassifierName>shaded</shadedClassifierName>
418+
<shadeTestJar>false</shadeTestJar>
419419
<minimizeJar>true</minimizeJar>
420420
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
421+
<createDependencyReducedPom>false</createDependencyReducedPom>
421422
<artifactSet>
422423
<includes>
423424
<include>com.google.guava:guava</include>

core/src/main/assemblies/common-bin.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,20 @@
1111
<include>com.spatial4j:spatial4j</include>
1212
<include>com.vividsolutions:jts</include>
1313
<include>org.codehaus.groovy:groovy-all</include>
14+
<include>com.google.guava:guava</include>
15+
<include>com.carrotsearch:hppc</include>
16+
<include>com.fasterxml.jackson.core:jackson-core</include>
17+
<include>com.fasterxml.jackson.dataformat:jackson-dataformat-smile</include>
18+
<include>com.fasterxml.jackson.dataformat:jackson-dataformat-yaml</include>
19+
<include>com.fasterxml.jackson.dataformat:jackson-dataformat-cbor</include>
20+
<include>joda-time:joda-time</include>
21+
<include>org.joda:joda-convert</include>
22+
<include>io.netty:netty</include>
23+
<include>com.ning:compress-lzf</include>
24+
<include>com.github.spullara.mustache.java:compiler</include>
25+
<include>com.tdunning:t-digest</include>
26+
<include>org.apache.commons:commons-lang3</include>
27+
<include>commons-cli:commons-cli</include>
1428
</includes>
1529
</dependencySet>
1630
<dependencySet>

pom.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -760,8 +760,6 @@
760760
<internalRuntimeForbidden>true</internalRuntimeForbidden>
761761
<!-- if the used Java version is too new, don't fail, just do nothing: -->
762762
<failOnUnsupportedJava>false</failOnUnsupportedJava>
763-
<!-- Temporary until we stabilize builds -->
764-
<failOnUnresolvableSignatures>false</failOnUnresolvableSignatures>
765763
<excludes>
766764
<exclude>jsr166e/**</exclude>
767765
</excludes>
@@ -792,8 +790,6 @@
792790
<internalRuntimeForbidden>true</internalRuntimeForbidden>
793791
<!-- if the used Java version is too new, don't fail, just do nothing: -->
794792
<failOnUnsupportedJava>false</failOnUnsupportedJava>
795-
<!-- Temporary until we stabilize builds -->
796-
<failOnUnresolvableSignatures>false</failOnUnresolvableSignatures>
797793
<bundledSignatures>
798794
<!-- This will automatically choose the right signatures based on 'targetVersion': -->
799795
<bundledSignature>jdk-unsafe</bundledSignature>

0 commit comments

Comments
 (0)