@@ -61,7 +61,7 @@ limitations under the License.
6161 <properties >
6262 <top .dir>${project.basedir} /..</top .dir>
6363 <build .timestamp>${maven.build.timestamp} </build .timestamp>
64- <shadeBase >com.linkedin.coral.\$internal </shadeBase >
64+ <shadeBase >com.linkedin.relocated </shadeBase >
6565 </properties >
6666
6767 <dependencies >
@@ -441,8 +441,9 @@ limitations under the License.
441441 <plugin >
442442 <groupId >org.apache.maven.plugins</groupId >
443443 <artifactId >maven-shade-plugin</artifactId >
444- <version >3.1 .1</version >
444+ <version >3.4 .1</version >
445445 <executions >
446+ <!-- First shaded JAR, relocate every transitive dependencies, org.apache.calcite itself stay un-relocated -->
446447 <execution >
447448 <id >shaded</id >
448449 <phase >package</phase >
@@ -535,7 +536,107 @@ limitations under the License.
535536 <shadedClassifierName >shaded</shadedClassifierName >
536537 </configuration >
537538 </execution >
538-
539+ <!-- Second shaded JAR, relocate everything including org.apache.calcite itself -->
540+ <execution >
541+ <id >shaded-all</id >
542+ <phase >package</phase >
543+ <goals >
544+ <goal >shade</goal >
545+ </goals >
546+ <configuration >
547+ <relocations >
548+ <relocation >
549+ <pattern >org.apache.calcite</pattern >
550+ <shadedPattern >${shadeBase} .org.apache.calcite</shadedPattern >
551+ </relocation >
552+ <relocation >
553+ <pattern >com.google.protobuf</pattern >
554+ <shadedPattern >${shadeBase} .com.google.protobuf</shadedPattern >
555+ </relocation >
556+ <relocation >
557+ <pattern >com.google.thirdparty</pattern >
558+ <shadedPattern >${shadeBase} .com.google.thirdparty</shadedPattern >
559+ </relocation >
560+ <relocation >
561+ <pattern >google.protobuf</pattern >
562+ <shadedPattern >${shadeBase} .google.protobuf</shadedPattern >
563+ </relocation >
564+ <relocation >
565+ <pattern >com.google.common</pattern >
566+ <shadedPattern >${shadeBase} .com.google.common</shadedPattern >
567+ </relocation >
568+ <relocation >
569+ <pattern >com.fasterxml.jackson</pattern >
570+ <shadedPattern >${shadeBase} .com.fasterxml.jackson</shadedPattern >
571+ </relocation >
572+ <relocation >
573+ <pattern >org.apache.http</pattern >
574+ <shadedPattern >${shadeBase} .org.apache.http</shadedPattern >
575+ </relocation >
576+ <relocation >
577+ <pattern >org.slf4j</pattern >
578+ <shadedPattern >${shadeBase} .org.slf4j</shadedPattern >
579+ </relocation >
580+ <relocation >
581+ <pattern >com.esri</pattern >
582+ <shadedPattern >${shadeBase} .com.esri</shadedPattern >
583+ </relocation >
584+ <relocation >
585+ <pattern >org.pentaho</pattern >
586+ <shadedPattern >${shadeBase} .org.pentaho</shadedPattern >
587+ </relocation >
588+ <relocation >
589+ <pattern >org.apache.commons.codec</pattern >
590+ <shadedPattern >${shadeBase} .org.apache.commons.codec</shadedPattern >
591+ </relocation >
592+ <relocation >
593+ <pattern >org.apache.commons</pattern >
594+ <shadedPattern >${shadeBase} .org.apache.commons</shadedPattern >
595+ </relocation >
596+ <relocation >
597+ <pattern >org.codehaus.janino</pattern >
598+ <shadedPattern >${shadeBase} .org.codehaus.janino</shadedPattern >
599+ </relocation >
600+ <relocation >
601+ <pattern >org.codehaus.commons</pattern >
602+ <shadedPattern >${shadeBase} .org.codehaus.commons</shadedPattern >
603+ </relocation >
604+ <relocation >
605+ <pattern >com.jayway</pattern >
606+ <shadedPattern >${shadeBase} .com.jayway</shadedPattern >
607+ </relocation >
608+ <relocation >
609+ <pattern >org.yaml</pattern >
610+ <shadedPattern >${shadeBase} .org.yaml</shadedPattern >
611+ </relocation >
612+ <relocation >
613+ <pattern >com.yahoo</pattern >
614+ <shadedPattern >${shadeBase} .com.yahoo</shadedPattern >
615+ </relocation >
616+ <relocation >
617+ <pattern >javax.annotation</pattern >
618+ <shadedPattern >${shadeBase} .javax.annotation</shadedPattern >
619+ </relocation >
620+ </relocations >
621+ <transformers >
622+ <transformer implementation =" org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
623+ </transformers >
624+ <filters >
625+ <filter >
626+ <artifact >*:*</artifact >
627+ <excludes >
628+ <exclude >mozilla/public-suffix-list.txt</exclude >
629+ <exclude >META-INF/*.SF</exclude >
630+ <exclude >META-INF/*.DSA</exclude >
631+ <exclude >META-INF/*.RSA</exclude >
632+ <exclude >org.codehaus.commons.compiler.properties</exclude >
633+ </excludes >
634+ </filter >
635+ </filters >
636+ <shadedArtifactAttached >true</shadedArtifactAttached >
637+ <shadedClassifierName >shaded-all</shadedClassifierName >
638+ </configuration >
639+ </execution >
539640 </executions >
540641 </plugin >
541642 </plugins >
0 commit comments