DRILL-5876: Use openssl profile to include netty-tcnative dependency with the platform specific classifier
This closes #1004 Project: http://git-wip-us.apache.org/repos/asf/drill/repo Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/b0c4e048 Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/b0c4e048 Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/b0c4e048 Branch: refs/heads/master Commit: b0c4e0486d6d4620b04a1bb8198e959d433b4840 Parents: 119251e Author: Vlad Rozov <[email protected]> Authored: Wed Oct 18 15:00:37 2017 -0700 Committer: Parth Chandra <[email protected]> Committed: Fri Oct 20 16:52:35 2017 -0700 ---------------------------------------------------------------------- .mvn/extensions.xml | 27 +++++++++++++++++ exec/java-exec/pom.xml | 20 +------------ .../apache/drill/exec/ssl/SSLConfigClient.java | 8 +++++ .../apache/drill/exec/ssl/SSLConfigServer.java | 8 +++++ exec/jdbc-all/pom.xml | 1 + pom.xml | 31 ++++++++++++++++++++ 6 files changed, 76 insertions(+), 19 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/drill/blob/b0c4e048/.mvn/extensions.xml ---------------------------------------------------------------------- diff --git a/.mvn/extensions.xml b/.mvn/extensions.xml new file mode 100644 index 0000000..bf8c8c7 --- /dev/null +++ b/.mvn/extensions.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +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. +--> +<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 http://maven.apache.org/xsd/core-extensions-1.0.0.xsd"> + <extension> + <groupId>kr.motd.maven</groupId> + <artifactId>os-maven-plugin</artifactId> + <version>1.5.0.Final</version> + </extension> +</extensions> http://git-wip-us.apache.org/repos/asf/drill/blob/b0c4e048/exec/java-exec/pom.xml ---------------------------------------------------------------------- diff --git a/exec/java-exec/pom.xml b/exec/java-exec/pom.xml index 88039a3..4cd7158 100644 --- a/exec/java-exec/pom.xml +++ b/exec/java-exec/pom.xml @@ -20,9 +20,6 @@ <name>exec/Java Execution Engine</name> <properties> <libpam4j.version>1.8-rev1</libpam4j.version> - <!-- Configure the os-maven-plugin extension to expand the classifier on --> - <!-- Fedora-"like" systems. Used for netty-tcnative inclusion --> - <os.detection.classifierWithLikes>fedora</os.detection.classifierWithLikes> </properties> <dependencies> @@ -590,11 +587,8 @@ <dependency> <groupId>io.netty</groupId> <artifactId>netty-tcnative</artifactId> - <version>2.0.1.Final</version> - <scope>provided</scope> - <classifier>${os.detected.classifier}</classifier> + <classifier>${netty.tcnative.classifier}</classifier> </dependency> - </dependencies> <profiles> @@ -696,18 +690,6 @@ </profiles> <build> - - <extensions> - <!-- - Include the os-maven-plugin to get os.detected.classifier - --> - <extension> - <groupId>kr.motd.maven</groupId> - <artifactId>os-maven-plugin</artifactId> - <version>1.5.0.Final</version> - </extension> - </extensions> - <plugins> <plugin> <artifactId>maven-resources-plugin</artifactId> http://git-wip-us.apache.org/repos/asf/drill/blob/b0c4e048/exec/java-exec/src/main/java/org/apache/drill/exec/ssl/SSLConfigClient.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/ssl/SSLConfigClient.java b/exec/java-exec/src/main/java/org/apache/drill/exec/ssl/SSLConfigClient.java index a5c9cd8..83f7f86 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/ssl/SSLConfigClient.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/ssl/SSLConfigClient.java @@ -63,6 +63,14 @@ public class SSLConfigClient extends SSLConfig { hsTimeout = DEFAULT_SSL_HANDSHAKE_TIMEOUT_MS; } handshakeTimeout = hsTimeout; + // If provider is OPENSSL then to debug or run this code in an IDE, you will need to enable + // the dependency on netty-tcnative with the correct classifier for the platform you use. + // This can be done by enabling the openssl profile. + // If the IDE is Eclipse, it requires you to install an additional Eclipse plugin available here: + // http://repo1.maven.org/maven2/kr/motd/maven/os-maven-plugin/1.5.0.Final/os-maven-plugin-1.5.0.Final.jar + // or from your local maven repository: + // ~/.m2/repository/kr/motd/maven/os-maven-plugin/1.5.0.Final/os-maven-plugin-1.5.0.Final.jar + // Note that installing this plugin may require you to start with a new workspace provider = getStringProperty(DrillProperties.TLS_PROVIDER, DEFAULT_SSL_PROVIDER); } http://git-wip-us.apache.org/repos/asf/drill/blob/b0c4e048/exec/java-exec/src/main/java/org/apache/drill/exec/ssl/SSLConfigServer.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/ssl/SSLConfigServer.java b/exec/java-exec/src/main/java/org/apache/drill/exec/ssl/SSLConfigServer.java index ba53571..976e2a6 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/ssl/SSLConfigServer.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/ssl/SSLConfigServer.java @@ -91,6 +91,14 @@ public class SSLConfigServer extends SSLConfig { resolveHadoopPropertyName(HADOOP_SSL_KEYSTORE_KEYPASSWORD_TPL_KEY, mode)); keyPassword = keyPass.isEmpty() ? keyStorePassword : keyPass; protocol = getConfigParamWithDefault(ExecConstants.SSL_PROTOCOL, DEFAULT_SSL_PROTOCOL); + // If provider is OPENSSL then to debug or run this code in an IDE, you will need to enable + // the dependency on netty-tcnative with the correct classifier for the platform you use. + // This can be done by enabling the openssl profile. + // If the IDE is Eclipse, it requires you to install an additional Eclipse plugin available here: + // http://repo1.maven.org/maven2/kr/motd/maven/os-maven-plugin/1.5.0.Final/os-maven-plugin-1.5.0.Final.jar + // or from your local maven repository: + // ~/.m2/repository/kr/motd/maven/os-maven-plugin/1.5.0.Final/os-maven-plugin-1.5.0.Final.jar + // Note that installing this plugin may require you to start with a new workspace provider = getConfigParamWithDefault(ExecConstants.SSL_PROVIDER, DEFAULT_SSL_PROVIDER); } http://git-wip-us.apache.org/repos/asf/drill/blob/b0c4e048/exec/jdbc-all/pom.xml ---------------------------------------------------------------------- diff --git a/exec/jdbc-all/pom.xml b/exec/jdbc-all/pom.xml index 4f9fa5b..9cbdb5a 100644 --- a/exec/jdbc-all/pom.xml +++ b/exec/jdbc-all/pom.xml @@ -328,6 +328,7 @@ <exclude>commons-io:commons-io</exclude> <exclude>commons-beanutils:commons-beanutils-core:jar:*</exclude> <exclude>commons-beanutils:commons-beanutils:jar:*</exclude> + <exclude>io.netty:netty-tcnative:jar:*</exclude> </excludes> </artifactSet> <relocations> http://git-wip-us.apache.org/repos/asf/drill/blob/b0c4e048/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 0cae23a..2c0d16c 100644 --- a/pom.xml +++ b/pom.xml @@ -44,6 +44,7 @@ <ojai.version>1.1</ojai.version> <kerby.version>1.0.0-RC2</kerby.version> <findbugs.version>3.0.0</findbugs.version> + <netty.tcnative.classifier></netty.tcnative.classifier> <!-- Currently Hive storage plugin only supports Apache Hive 1.2 or vendor specific variants of the @@ -1010,6 +1011,14 @@ </exclusion> </exclusions> </dependency> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-tcnative</artifactId> + <version>2.0.1.Final</version> + <classifier>${netty.tcnative.classifier}</classifier> + <scope>runtime</scope> + <optional>true</optional> + </dependency> </dependencies> </dependencyManagement> @@ -2410,6 +2419,28 @@ </modules> </profile> <profile> + <!-- + If the IDE is Eclipse, it requires you to install an additional Eclipse plugin available here: + http://repo1.maven.org/maven2/kr/motd/maven/os-maven-plugin/1.5.0.Final/os-maven-plugin-1.5.0.Final.jar + or from your local maven repository: + ~/.m2/repository/kr/motd/maven/os-maven-plugin/1.5.0.Final/os-maven-plugin-1.5.0.Final.jar + Note that installing this plugin may require you to start with a new workspace + --> + <id>openssl</id> + <activation> + <property> + <name>enableOpenSSL</name> + <value>true</value> + </property> + </activation> + <properties> + <!-- Configure the os-maven-plugin extension to expand the classifier on --> + <!-- Fedora-"like" systems. Used for netty-tcnative inclusion --> + <os.detection.classifierWithLikes>fedora</os.detection.classifierWithLikes> + <netty.tcnative.classifier>${os.detected.classifier}</netty.tcnative.classifier> + </properties> + </profile> + <profile> <id>findbugs</id> <activation> <activeByDefault>false</activeByDefault>
