nickwallen commented on a change in pull request #1345: METRON-2012 Unable to 
Execute Stellar Functions Against HBase in the REPL
URL: https://github.com/apache/metron/pull/1345#discussion_r262627047
 
 

 ##########
 File path: metron-platform/metron-common/pom.xml
 ##########
 @@ -443,13 +444,12 @@
                             <relocations>
                                 <relocation>
                                     <pattern>com.google.common</pattern>
-                                    
<shadedPattern>org.apache.metron.guava</shadedPattern>
+                                    
<shadedPattern>org.apache.metron.guava.${guava_version}</shadedPattern>
 
 Review comment:
   In all the places where Guava is relocated, I used this standard prefix, 
which includes the version number.  `org.apache.metron.guava.${guava_version}`
   
   
   This ensures that multiple projects pulling in different versions of Guava 
do not overwrite one another.  This also ensures that multiple copies of a 
specific Guava version will not be included in the jar.
   
   I followed this pattern throughout.  The specific Guava version necessary is 
declared at the top.  I then ensure we have an explicit dependency on Guava, 
and make sure that Guava is relocated to a path that includes the version 
number.  Using a property for the Guava version makes sure the relocation and 
the dependency line up correctly.
   
   The resulting JARs will look like the following.
   ```
   $ jar -tvf metron-platform/metron-common/target/metron-common-0.7.1.jar | 
grep Stopwatch
     1088 Tue Mar 05 13:11:28 EST 2019 
org/apache/metron/guava/17/0/base/Stopwatch$1.class
     4002 Tue Mar 05 13:11:28 EST 2019 
org/apache/metron/guava/17/0/base/Stopwatch.class
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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


With regards,
Apache Git Services

Reply via email to