You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by cu...@apache.org on 2019/04/04 20:17:58 UTC

[arrow] branch master updated: ARROW-5062: [Java][FlightRPC] Shade com.google.guava usage in Flight

This is an automated email from the ASF dual-hosted git repository.

cutlerb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new 32fda11  ARROW-5062: [Java][FlightRPC] Shade com.google.guava usage in Flight
32fda11 is described below

commit 32fda11b1b9b9ea1500daea06f6de6f9970b0336
Author: Bryan Cutler <cu...@gmail.com>
AuthorDate: Thu Apr 4 13:17:24 2019 -0700

    ARROW-5062: [Java][FlightRPC] Shade com.google.guava usage in Flight
    
    This adds com.google.guava usage in Arrow Flight a new extended shaded artifact with `shade-ext` classifier. Guava is a commonly used library and could cause a conflict if a user has an older, incompatible version of Guava as a dependency.
    
    Author: Bryan Cutler <cu...@gmail.com>
    
    Closes #4105 from BryanCutler/java-shade-guava-ARROW-5062 and squashes the following commits:
    
    68d2b63 <Bryan Cutler> add shaded guava as an additional artifact
    d43bfb8 <Bryan Cutler> add com.google.guava usage to be shaded
---
 java/flight/pom.xml | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/java/flight/pom.xml b/java/flight/pom.xml
index 6e0512b..064aa5b 100644
--- a/java/flight/pom.xml
+++ b/java/flight/pom.xml
@@ -130,6 +130,7 @@
         <version>3.1.1</version>
         <executions>
           <execution>
+            <id>shade-main</id>
             <phase>package</phase>
             <goals>
               <goal>shade</goal>
@@ -154,6 +155,37 @@
               </transformers>
             </configuration>
           </execution>
+          <execution>
+            <id>shade-ext</id>
+            <phase>package</phase>
+            <goals>
+              <goal>shade</goal>
+            </goals>
+            <configuration>
+              <shadedArtifactAttached>true</shadedArtifactAttached>
+              <shadedClassifierName>shaded-ext</shadedClassifierName>
+              <artifactSet>
+                <includes>
+                  <include>io.grpc:*</include>
+                  <include>com.google.protobuf:*</include>
+                  <include>com.google.guava:*</include>
+                </includes>
+              </artifactSet>
+              <relocations>
+                <relocation>
+                  <pattern>com.google.protobuf</pattern>
+                  <shadedPattern>arrow.flight.com.google.protobuf</shadedPattern>
+                </relocation>
+                <relocation>
+                  <pattern>com.google.common</pattern>
+                  <shadedPattern>arrow.flight.com.google.common</shadedPattern>
+                </relocation>
+              </relocations>
+              <transformers>
+                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
+              </transformers>
+            </configuration>
+          </execution>
         </executions>
       </plugin>
       <plugin>