Skip to content

Commit

Permalink
DRILL-5876: Use openssl profile to include netty-tcnative dependency …
Browse files Browse the repository at this point in the history
…with the platform specific classifier

This closes apache#1004
  • Loading branch information
vrozov authored and parthchandra committed Oct 20, 2017
1 parent 119251e commit b0c4e04
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 19 deletions.
27 changes: 27 additions & 0 deletions .mvn/extensions.xml
Original file line number Diff line number Diff line change
@@ -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>
20 changes: 1 addition & 19 deletions exec/java-exec/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ public SSLConfigClient(Properties properties) throws DrillException {
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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ public SSLConfigServer(DrillConfig config, Configuration hadoopConfig) throws Dr
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);
}

Expand Down
1 change: 1 addition & 0 deletions exec/jdbc-all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
31 changes: 31 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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>

Expand Down Expand Up @@ -2409,6 +2418,28 @@
<module>contrib</module>
</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>
Expand Down

0 comments on commit b0c4e04

Please sign in to comment.