[ 
https://issues.apache.org/jira/browse/DRILL-6422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16511287#comment-16511287
 ] 

ASF GitHub Bot commented on DRILL-6422:
---------------------------------------

vvysotskyi commented on a change in pull request #1264:  DRILL-6422: Update 
guava to 23.0 and shade it
URL: https://github.com/apache/drill/pull/1264#discussion_r195124604
 
 

 ##########
 File path: contrib/guava-shaded/pom.xml
 ##########
 @@ -0,0 +1,141 @@
+<?xml version="1.0"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <artifactId>drill-contrib-parent</artifactId>
+    <groupId>org.apache.drill.contrib</groupId>
+    <version>1.14.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>guava-shaded</artifactId>
+  <name>contrib/guava-shaded</name>
+
+  <packaging>jar</packaging>
+
+  <properties>
+    <!-- skip source archives -->
+    <assembly.attach>false</assembly.attach>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>com.google.guava</groupId>
+      <artifactId>guava</artifactId>
+      <version>${dep.guava.version}</version>
+      <type>jar</type>
+    </dependency>
+  </dependencies>
+
+  <build>
+
+    
<sourceDirectory>${project.build.directory}/shaded-sources</sourceDirectory>
+
+    <plugins>
+      <plugin>
+        <artifactId>maven-source-plugin</artifactId>
+        <configuration>
+          <skipSource>true</skipSource>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-shade-plugin</artifactId>
+        <version>3.1.0</version>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>shade</goal>
+            </goals>
+            <configuration>
+              <createSourcesJar>true</createSourcesJar>
+              <shadeSourcesContent>true</shadeSourcesContent>
+              <createDependencyReducedPom>false</createDependencyReducedPom>
+              <artifactSet>
+                <includes>
+                  <include>com.google.guava:*</include>
+                </includes>
+              </artifactSet>
+              <relocations>
+                <relocation>
+                  <pattern>com.google.common</pattern>
+                  
<shadedPattern>org.apache.drill.shaded.com.google.common</shadedPattern>
 
 Review comment:
   Yes, we want to relocate all classes, included to the jar, but if these 
classes use other classes whose package matches the pattern, but they belong to 
the other lib, their packages also will be relocated. And since these classes 
with relocated packages do not exist, a build will fail. Therefore I left 
pattern the same. 
   
   Also, since guava has a single package which does not match the pattern: 
`com.google.thirdparty.publicsuffix` which was not used in Drill or any other 
project which Drill use, I don't think it may cause problems.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Update guava to 23.0 and shade it
> ---------------------------------
>
>                 Key: DRILL-6422
>                 URL: https://issues.apache.org/jira/browse/DRILL-6422
>             Project: Apache Drill
>          Issue Type: Task
>            Reporter: Volodymyr Vysotskyi
>            Assignee: Volodymyr Vysotskyi
>            Priority: Major
>             Fix For: 1.14.0
>
>
> Some hadoop libraries use old versions of guava and most of them are 
> incompatible with guava 23.0.
> To allow usage of new guava version, it should be shaded and shaded version 
> should be used in the project.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to