You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by lc...@apache.org on 2018/01/02 17:41:43 UTC

[beam] branch master updated: [SQL] Fix shading configuration

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 6450a9c  [SQL] Fix shading configuration
6450a9c is described below

commit 6450a9ca0f99f5a5d4cce4e4bb84a7c814c98407
Author: Anton Kedin <ke...@google.com>
AuthorDate: Thu Dec 28 10:15:03 2017 -0800

    [SQL] Fix shading configuration
---
 sdks/java/extensions/sql/build.gradle | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/sdks/java/extensions/sql/build.gradle b/sdks/java/extensions/sql/build.gradle
index 9cd9304..e1bdeb9 100644
--- a/sdks/java/extensions/sql/build.gradle
+++ b/sdks/java/extensions/sql/build.gradle
@@ -103,11 +103,16 @@ shadowJar {
     include(dependency("org.codehaus.janino:.*"))
     include(dependency(library.java.protobuf_java))
   }
-  relocate "com.google.protobuf", "org.apache.beam." + project.name.replace("-", ".") + "repackaged.com.google.protobuf"
-  relocate "org.apache.calcite", "org.apache.beam." + project.name.replace("-", ".") + "repackaged.org.apache.calcite"
-  relocate "org.codehaus", "org.apache.beam." + project.name.replace("-", ".") + ".repackaged.org.codehaus"
+  relocate "com.google.protobuf", "org.apache.beam." + project.name.replace("-", ".") + ".repackaged.com.google.protobuf"
+  relocate "org.apache.calcite", "org.apache.beam." + project.name.replace("-", ".") + ".repackaged.org.apache.calcite"
+
+  // Calcite fails to look up the compiler factory after this relocation if destination is 'org.apache.beam' like above.
+  // The factory is looked by class name which stored in the resources.
+  // Shading plugin doesn't handle replacing that class name correctly.
+  relocate "org.codehaus", "org.apache." + project.name.replace("-", ".") + ".repackaged.org.codehaus"
 }
 
+
 task packageTests(type: Jar) {
   from sourceSets.test.output
   classifier = "tests"

-- 
To stop receiving notification emails like this one, please contact
['"commits@beam.apache.org" <co...@beam.apache.org>'].