hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bus...@apache.org
Subject [hbase] branch branch-2 updated: HBASE-21808 Ensure we can build with JDK11 targetting JDK8
Date Sat, 02 Feb 2019 05:54:57 GMT
This is an automated email from the ASF dual-hosted git repository.

busbey pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2 by this push:
     new e8767ea  HBASE-21808 Ensure we can build with JDK11 targetting JDK8
e8767ea is described below

commit e8767ea49538b72befe4581d4e44ae50dc332728
Author: Sean Busbey <busbey@apache.org>
AuthorDate: Wed Jan 30 02:20:33 2019 -0600

    HBASE-21808 Ensure we can build with JDK11 targetting JDK8
    
    Signed-off-by: Josh Elser <elserj@apache.org>
    (cherry picked from commit 5784a09fff10f5ce927d489559331345ff9045f5)
---
 hbase-assembly/pom.xml                             |  1 +
 hbase-assembly/src/main/assembly/client.xml        |  5 ++++-
 .../src/main/assembly/hadoop-two-compat.xml        |  5 ++++-
 hbase-it/pom.xml                                   | 15 +++++++++++--
 hbase-protocol-shaded/pom.xml                      | 14 ++++++++++++
 hbase-protocol/pom.xml                             | 12 +++++++++++
 hbase-shaded/hbase-shaded-client/pom.xml           |  2 ++
 hbase-shaded/pom.xml                               |  2 ++
 pom.xml                                            | 25 ++++++++++++++++++++--
 9 files changed, 75 insertions(+), 6 deletions(-)

diff --git a/hbase-assembly/pom.xml b/hbase-assembly/pom.xml
index 6b705af..4005947 100644
--- a/hbase-assembly/pom.xml
+++ b/hbase-assembly/pom.xml
@@ -138,6 +138,7 @@
               <goal>unpack-dependencies</goal>
             </goals>
             <configuration>
+              <excludeTypes>pom</excludeTypes>
               <useSubDirectoryPerArtifact>true</useSubDirectoryPerArtifact>
               <includes>**\/NOTICE,**\/NOTICE.txt</includes>
             </configuration>
diff --git a/hbase-assembly/src/main/assembly/client.xml b/hbase-assembly/src/main/assembly/client.xml
index c875b95..acaea0d 100644
--- a/hbase-assembly/src/main/assembly/client.xml
+++ b/hbase-assembly/src/main/assembly/client.xml
@@ -42,8 +42,11 @@
         <outputDirectory>lib</outputDirectory>
       <dependencySets>
         <dependencySet>
-            <!-- Exclude libraries that we put in their own dirs under lib/ -->
             <excludes>
+            <!-- Exclude J2EE libraries that get pulled in when building on JDK11 -->
+              <exclude>javax.annotation:javax.annotation-api</exclude>
+              <exclude>com.sun.xml.ws:jaxws-ri</exclude>
+            <!-- Exclude libraries that we put in their own dirs under lib/ -->
               <exclude>org.jruby:jruby-complete</exclude>
               <exclude>com.sun.jersey:*</exclude>
               <exclude>com.sun.jersey.contribs:*</exclude>
diff --git a/hbase-assembly/src/main/assembly/hadoop-two-compat.xml b/hbase-assembly/src/main/assembly/hadoop-two-compat.xml
index d713f9e..feb6e2a 100644
--- a/hbase-assembly/src/main/assembly/hadoop-two-compat.xml
+++ b/hbase-assembly/src/main/assembly/hadoop-two-compat.xml
@@ -63,8 +63,11 @@
         <unpack>false</unpack>
         <dependencySets>
           <dependencySet>
-            <!-- Exclude libraries that we put in their own dirs under lib/ -->
             <excludes>
+            <!-- Exclude J2EE libraries that get pulled in when building on JDK11 -->
+              <exclude>javax.annotation:javax.annotation-api</exclude>
+              <exclude>com.sun.xml.ws:jaxws-ri</exclude>
+            <!-- Exclude libraries that we put in their own dirs under lib/ -->
               <exclude>org.jruby:jruby-complete</exclude>
               <exclude>com.sun.jersey:*</exclude>
               <exclude>com.sun.jersey.contribs:*</exclude>
diff --git a/hbase-it/pom.xml b/hbase-it/pom.xml
index ef2603b..8985bdc 100644
--- a/hbase-it/pom.xml
+++ b/hbase-it/pom.xml
@@ -293,8 +293,19 @@
         <skipTests>true</skipTests>
       </properties>
     </profile>
-
-
+    <profile>
+      <id>build-with-jdk11</id>
+      <activation>
+        <jdk>[1.11,)</jdk>
+      </activation>
+      <dependencies>
+        <dependency>
+          <groupId>com.sun.xml.ws</groupId>
+          <artifactId>jaxws-ri</artifactId>
+          <type>pom</type>
+        </dependency>
+      </dependencies>
+    </profile>
     <!-- profile for building against Hadoop 2.x.  This is the default -->
     <profile>
       <id>hadoop-2.0</id>
diff --git a/hbase-protocol-shaded/pom.xml b/hbase-protocol-shaded/pom.xml
index 5af1f3b..3c9162e 100644
--- a/hbase-protocol-shaded/pom.xml
+++ b/hbase-protocol-shaded/pom.xml
@@ -153,6 +153,8 @@
               </relocations>
               <artifactSet>
                 <excludes>
+                  <!-- exclude J2EE modules that come in for JDK11+ -->
+                  <exclude>javax.annotation:javax.annotation-api</exclude>
                   <!--Exclude protobuf itself. We get a patched version from hbase-thirdparty.
                     -->
                   <exclude>org.apache.hbase.thirdparty:*</exclude>
@@ -266,5 +268,17 @@
         <surefire.skipSecondPart>true</surefire.skipSecondPart>
       </properties>
     </profile>
+    <profile>
+      <id>build-with-jdk11</id>
+      <activation>
+        <jdk>[1.11,)</jdk>
+      </activation>
+      <dependencies>
+        <dependency>
+          <groupId>javax.annotation</groupId>
+          <artifactId>javax.annotation-api</artifactId>
+        </dependency>
+      </dependencies>
+    </profile>
   </profiles>
 </project>
diff --git a/hbase-protocol/pom.xml b/hbase-protocol/pom.xml
index 2952d87..360b2d4 100644
--- a/hbase-protocol/pom.xml
+++ b/hbase-protocol/pom.xml
@@ -135,5 +135,17 @@
         <surefire.skipSecondPart>true</surefire.skipSecondPart>
       </properties>
     </profile>
+    <profile>
+      <id>build-with-jdk11</id>
+      <activation>
+        <jdk>[1.11,)</jdk>
+      </activation>
+      <dependencies>
+        <dependency>
+          <groupId>javax.annotation</groupId>
+          <artifactId>javax.annotation-api</artifactId>
+        </dependency>
+      </dependencies>
+    </profile>
   </profiles>
 </project>
diff --git a/hbase-shaded/hbase-shaded-client/pom.xml b/hbase-shaded/hbase-shaded-client/pom.xml
index 8063782..8dbcdae 100644
--- a/hbase-shaded/hbase-shaded-client/pom.xml
+++ b/hbase-shaded/hbase-shaded-client/pom.xml
@@ -54,6 +54,8 @@
                         <configuration>
                             <artifactSet>
                                 <excludes>
+                                    <!-- exclude J2EE modules that come in for JDK11+
-->
+                                    <exclude>javax.annotation:javax.annotation-api</exclude>
                                     <!--
                                       Tell the shade plugin that in this case we want to
include hadoop
                                       by leaving out the exclude.
diff --git a/hbase-shaded/pom.xml b/hbase-shaded/pom.xml
index 5d70e42..f327092 100644
--- a/hbase-shaded/pom.xml
+++ b/hbase-shaded/pom.xml
@@ -132,6 +132,8 @@
                                 <shadeTestJar>false</shadeTestJar>
                                 <artifactSet>
                                     <excludes>
+                                        <!-- exclude J2EE modules that come in for JDK11+
-->
+                                        <exclude>javax.annotation:javax.annotation-api</exclude>
                                         <!-- default to excluding Hadoop, have module
that want
                                              to include it redefine the exclude list -->
                                         <exclude>org.apache.hadoop:*</exclude>
diff --git a/pom.xml b/pom.xml
index 22332f6..c6adaa4a 100755
--- a/pom.xml
+++ b/pom.xml
@@ -1478,7 +1478,7 @@
     <maven.antrun.version>1.8</maven.antrun.version>
     <maven.bundle.version>3.3.0</maven.bundle.version>
     <maven.checkstyle.version>3.0.0</maven.checkstyle.version>
-    <maven.compiler.version>3.6.1</maven.compiler.version>
+    <maven.compiler.version>3.8.0</maven.compiler.version>
     <maven.dependency.version>3.0.1</maven.dependency.version>
     <maven.eclipse.version>2.10</maven.eclipse.version>
     <maven.install.version>2.5.2</maven.install.version>
@@ -2255,7 +2255,7 @@
     <profile>
       <id>build-with-jdk8</id>
       <activation>
-        <jdk>1.8</jdk>
+        <jdk>[1.8,)</jdk>
       </activation>
       <build>
         <pluginManagement>
@@ -2283,6 +2283,27 @@
         </pluginManagement>
       </build>
     </profile>
+    <profile>
+      <id>build-with-jdk11</id>
+      <activation>
+        <jdk>[1.11,)</jdk>
+      </activation>
+      <dependencyManagement>
+        <dependencies>
+          <dependency>
+            <groupId>javax.annotation</groupId>
+            <artifactId>javax.annotation-api</artifactId>
+            <version>1.3.2</version>
+          </dependency>
+          <dependency>
+            <groupId>com.sun.xml.ws</groupId>
+            <artifactId>jaxws-ri</artifactId>
+            <version>2.3.1</version>
+            <type>pom</type>
+          </dependency>
+        </dependencies>
+      </dependencyManagement>
+    </profile>
     <!-- profile activated by the Jenkins patch testing job -->
     <profile>
       <id>jenkins.patch</id>


Mime
View raw message