Skip to content

Commit

Permalink
update shade settings to handle Calcite dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
mingmxu committed Sep 13, 2017
1 parent 50532f0 commit 522e6c1
Showing 1 changed file with 55 additions and 29 deletions.
84 changes: 55 additions & 29 deletions sdks/java/extensions/sql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,35 +92,61 @@
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<id>bundle-and-repackage</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadeTestJar>true</shadeTestJar>
<artifactSet>
<includes>
<include>com.google.guava:guava</include>
</includes>
</artifactSet>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<id>bundle-and-repackage</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadeTestJar>true</shadeTestJar>
<artifactSet>
<includes>
<include>com.google.guava:guava</include>
<!-- include Apache Calcite and related dependencies -->
<include>org.apache.calcite:*</include>
<include>org.codehaus.janino:*</include>
</includes>
</artifactSet>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
<relocations>
<relocation>
<pattern>com.google.common</pattern>
<excludes>
<!-- com.google.common is too generic, need to exclude guava-testlib -->
<exclude>com.google.common.**.testing.*</exclude>
</excludes>
<!--suppress MavenModelInspection -->
<shadedPattern>
org.apache.${renderedArtifactId}.repackaged.com.google.common
</shadedPattern>
</relocation>
<relocation>
<pattern>com.google.thirdparty</pattern>
<!--suppress MavenModelInspection -->
<shadedPattern>
org.apache.${renderedArtifactId}.repackaged.com.google.thirdparty
</shadedPattern>
</relocation>
</relocations>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
</transformers>
</configuration>
</execution>
</executions>
</plugin>

<!-- Coverage analysis for unit tests. -->
Expand Down

0 comments on commit 522e6c1

Please sign in to comment.