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

elserj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ratis-thirdparty.git


The following commit(s) were added to refs/heads/master by this push:
     new 84dfcde  RATIS-383. Include netty-tcnative native libraries into the 
misc artifact
84dfcde is described below

commit 84dfcde06c40e6bdcf8d1c6d3a6a819bb09707ce
Author: Xiaoyu Yao <[email protected]>
AuthorDate: Thu Nov 29 16:47:36 2018 -0500

    RATIS-383. Include netty-tcnative native libraries into the misc artifact
    
    Signed-off-by: Josh Elser <[email protected]>
---
 misc/pom.xml | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 pom.xml      | 22 +++++++++----------
 2 files changed, 79 insertions(+), 13 deletions(-)

diff --git a/misc/pom.xml b/misc/pom.xml
index 073e816..e1b01e2 100644
--- a/misc/pom.xml
+++ b/misc/pom.xml
@@ -65,6 +65,10 @@
       <version>2.8.2</version>
     </dependency>
     <dependency>
+      <groupId>io.netty</groupId>
+      <artifactId>netty-tcnative-boringssl-static</artifactId>
+    </dependency>
+    <dependency>
       <groupId>io.opencensus</groupId>
       <artifactId>opencensus-api</artifactId>
       <version>${io.opencensus.version}</version>
@@ -155,13 +159,24 @@
                   
<shadedPattern>${ratis.thirdparty.shaded.prefix}.org.checkerframework</shadedPattern>
                 </relocation>
               </relocations>
+              <filters>
+                <!-- Filter unshaded netty_tcnative libs -->
+                <filter>
+                  <artifact>io.netty:netty-tcnative-boringssl-static</artifact>
+                  <excludes>
+                    
<exclude>META-INF/native/libnetty_tcnative_linux_x86_64.so</exclude>
+                    
<exclude>META-INF/native/netty_tcnative_windows_x86_64.dll</exclude>
+                    
<exclude>META-INF/native/libnetty_tcnative_osx_x86_64.jnilib</exclude>
+                  </excludes>
+                </filter>
+              </filters>
               <artifactSet>
                 <includes>
                   <!-- Package all listed dependencies -->
                   <include>*:*</include>
                 </includes>
                 <excludes>
-                  <!-- Remove ransitive stuff we don't need coming from google 
deps -->
+                  <!-- Remove transitive stuff we don't need coming from 
google deps -->
                   <exclude>com.google.code.findbugs:jsr305</exclude>
                   
<exclude>com.google.errorprone:error_prone_annotations</exclude>
                   <exclude>com.google.j2objc:j2objc-annotations</exclude>
@@ -190,6 +205,59 @@
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <version>3.0.2</version>
+        <executions>
+          <execution>
+            <id>unpack-dependencies</id>
+            <phase>validate</phase>
+            <goals>
+              <goal>unpack-dependencies</goal>
+            </goals>
+            <configuration>
+              <includeGroupIds>io.netty</includeGroupIds>
+              
<includeArtifactIds>netty-tcnative-boringssl-static</includeArtifactIds>
+              <includes>**/META-INF/native/*</includes>
+              
<outputDirectory>${project.build.directory}/classes/</outputDirectory>
+              <overWriteReleases>true</overWriteReleases>
+              <overWriteSnapshots>true</overWriteSnapshots>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <!-- The native libraries need to be named in the same way we relocate 
the Netty classes via the shade-plugin -->
+      <plugin>
+        <groupId>com.coderplus.maven.plugins</groupId>
+        <artifactId>copy-rename-maven-plugin</artifactId>
+        <version>1.0</version>
+        <executions>
+          <execution>
+            <id>rename-file</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>rename</goal>
+            </goals>
+            <configuration>
+              <fileSets>
+                <fileSet>
+                  
<sourceFile>${project.build.directory}/classes/META-INF/native/libnetty_tcnative_linux_x86_64.so</sourceFile>
+                  
<destinationFile>${project.build.directory}/classes/META-INF/native/lib${ratis.thirdparty.shaded.native.prefix}netty_tcnative_linux_x86_64.so</destinationFile>
+                </fileSet>
+                <fileSet>
+                  
<sourceFile>${project.build.directory}/classes/META-INF/native/netty_tcnative_windows_x86_64.dll</sourceFile>
+                  
<destinationFile>${project.build.directory}/classes/META-INF/native/${ratis.thirdparty.shaded.native.prefix}netty_tcnative_windows_x86_64.dll</destinationFile>
+                </fileSet>
+                <fileSet>
+                  
<sourceFile>${project.build.directory}/classes/META-INF/native/libnetty_tcnative_osx_x86_64.jnilib</sourceFile>
+                  
<destinationFile>${project.build.directory}/classes/META-INF/native/lib${ratis.thirdparty.shaded.native.prefix}netty_tcnative_osx_x86_64.jnilib</destinationFile>
+                </fileSet>
+              </fileSets>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
   </build>
 </project>
diff --git a/pom.xml b/pom.xml
index 51736d3..10cf500 100644
--- a/pom.xml
+++ b/pom.xml
@@ -67,13 +67,15 @@
     <!--Version of protobuf to be shaded -->
     <shaded.protobuf.version>3.5.0</shaded.protobuf.version>
     <!--Version of grpc to be shaded -->
-    <shaded.grpc.version>1.14.0</shaded.grpc.version>
+    <shaded.grpc.version>1.16.0</shaded.grpc.version>
     <!--Version of Netty to be shaded -->
-    <shaded.netty.version>4.1.27.Final</shaded.netty.version>
+    <shaded.netty.version>4.1.30.Final</shaded.netty.version>
+    <!--Version of tcnative to be shaded -->
+    <shaded.netty.tcnative.version>2.0.17.Final</shaded.netty.tcnative.version>
 
     <io.opencensus.version>0.12.2</io.opencensus.version>
     
<ratis.thirdparty.shaded.prefix>org.apache.ratis.thirdparty</ratis.thirdparty.shaded.prefix>
-
+    
<ratis.thirdparty.shaded.native.prefix>org_apache_ratis_thirdparty_</ratis.thirdparty.shaded.native.prefix>
     <hadoop.version>3.1.1</hadoop.version>
   </properties>
 
@@ -125,6 +127,11 @@
         <version>${shaded.netty.version}</version>
       </dependency>
       <dependency>
+        <groupId>io.netty</groupId>
+        <artifactId>netty-tcnative-boringssl-static</artifactId>
+        <version>${shaded.netty.tcnative.version}</version>
+      </dependency>
+      <dependency>
         <groupId>com.google.code.gson</groupId>
         <artifactId>gson</artifactId>
         <version>2.8.2</version>
@@ -143,14 +150,6 @@
   </dependencyManagement>
 
   <build>
-    <extensions>
-      <extension>
-        <groupId>kr.motd.maven</groupId>
-        <artifactId>os-maven-plugin</artifactId>
-        <version>1.5.0.Final</version>
-      </extension>
-    </extensions>
-
     <pluginManagement>
       <plugins>
         <plugin>
@@ -307,7 +306,6 @@
       </plugin>
     </plugins>
   </build>
-
   <profiles>
     <profile>
       <id>release</id>

Reply via email to