939 lines
38 KiB
Plaintext
939 lines
38 KiB
Plaintext
![]() |
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
<!--
|
||
|
~ Copyright 2014 The Netty Project
|
||
|
~
|
||
|
~ The Netty Project 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.
|
||
|
-->
|
||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||
|
<modelVersion>4.0.0</modelVersion>
|
||
|
<parent>
|
||
|
<groupId>org.sonatype.oss</groupId>
|
||
|
<artifactId>oss-parent</artifactId>
|
||
|
<version>9</version>
|
||
|
</parent>
|
||
|
|
||
|
<groupId>io.netty</groupId>
|
||
|
<artifactId>netty-tcnative-parent</artifactId>
|
||
|
<version>2.0.52.Final</version>
|
||
|
<packaging>pom</packaging>
|
||
|
|
||
|
<name>Netty/TomcatNative [Parent]</name>
|
||
|
<url>https://github.com/netty/netty-tcnative/</url>
|
||
|
<description>
|
||
|
A Mavenized fork of Tomcat Native which incorporates various patches
|
||
|
</description>
|
||
|
|
||
|
<scm>
|
||
|
<url>https://github.com/netty/netty-tcnative</url>
|
||
|
<connection>scm:git:git://github.com/netty/netty-tcnative.git</connection>
|
||
|
<developerConnection>scm:git:ssh://git@github.com/netty/netty-tcnative.git</developerConnection>
|
||
|
<tag>HEAD</tag>
|
||
|
</scm>
|
||
|
|
||
|
<developers>
|
||
|
<developer>
|
||
|
<id>netty.io</id>
|
||
|
<name>The Netty Project Contributors</name>
|
||
|
<email>netty@googlegroups.com</email>
|
||
|
<url>https://netty.io/</url>
|
||
|
<organization>The Netty Project</organization>
|
||
|
<organizationUrl>https://netty.io/</organizationUrl>
|
||
|
</developer>
|
||
|
</developers>
|
||
|
|
||
|
<organization>
|
||
|
<name>The Netty Project</name>
|
||
|
<url>https://netty.io/</url>
|
||
|
</organization>
|
||
|
|
||
|
<licenses>
|
||
|
<license>
|
||
|
<name>The Apache Software License, Version 2.0</name>
|
||
|
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||
|
<distribution>repo</distribution>
|
||
|
</license>
|
||
|
</licenses>
|
||
|
|
||
|
<properties>
|
||
|
<maven.javadoc.failOnError>false</maven.javadoc.failOnError>
|
||
|
<checkstyle.skip>true</checkstyle.skip>
|
||
|
<enforcer.plugin.version>1.4.1</enforcer.plugin.version>
|
||
|
<maven.compiler.source>1.6</maven.compiler.source>
|
||
|
<maven.compiler.target>1.6</maven.compiler.target>
|
||
|
<netty.build.version>30</netty.build.version>
|
||
|
<animal.sniffer.skip>true</animal.sniffer.skip>
|
||
|
<forceAutogen>false</forceAutogen>
|
||
|
<forceConfigure>false</forceConfigure>
|
||
|
<opensslDynamicDir>../openssl-dynamic</opensslDynamicDir>
|
||
|
<vsStaticTemplateFile>../vs2010.vcxproj.static.template</vsStaticTemplateFile>
|
||
|
<defaultJarFile>${project.build.directory}/${project.build.finalName}.jar</defaultJarFile>
|
||
|
<nativeJarFile>${project.build.directory}/${project.build.finalName}-${os.detected.classifier}.jar</nativeJarFile>
|
||
|
<nativeLibOnlyDir>${project.build.directory}/native-lib-only</nativeLibOnlyDir>
|
||
|
<nativeJarWorkdir>${project.build.directory}/native-jar-work</nativeJarWorkdir>
|
||
|
<nativeLibOsParts>${os.detected.name}_${os.detected.arch}</nativeLibOsParts>
|
||
|
<aprVersion>1.7.0</aprVersion>
|
||
|
<aprSha256>48e9dbf45ae3fdc7b491259ffb6ccf7d63049ffacbc1c0977cced095e4c2d5a2</aprSha256>
|
||
|
<boringsslBranch>chromium-stable</boringsslBranch>
|
||
|
<!--
|
||
|
See https://boringssl.googlesource.com/boringssl/+/refs/heads/chromium-stable for the latest commit
|
||
|
-->
|
||
|
<boringsslCommitSha>3a667d10e94186fd503966f5638e134fe9fb4080</boringsslCommitSha>
|
||
|
<libresslVersion>3.4.3</libresslVersion>
|
||
|
<!--
|
||
|
See https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/SHA256 for the SHA256 signature
|
||
|
-->
|
||
|
<libresslSha256>ff88bffe354818b3ccf545e3cafe454c5031c7a77217074f533271d63c37f08d</libresslSha256>
|
||
|
<opensslMinorVersion>1.1.1</opensslMinorVersion>
|
||
|
<opensslPatchVersion>n</opensslPatchVersion>
|
||
|
<opensslVersion>${opensslMinorVersion}${opensslPatchVersion}</opensslVersion>
|
||
|
<opensslSha256>40dceb51a4f6a5275bde0e6bf20ef4b91bfc32ed57c0552e2e8e15463372b17a</opensslSha256>
|
||
|
<aprHome>${project.build.directory}/apr</aprHome>
|
||
|
<aprSourceDir>${project.build.directory}/apr-source</aprSourceDir>
|
||
|
<aprPatchFile>r1871981-macos11.patch</aprPatchFile>
|
||
|
<aprPatchFileSha256>8754b8089d0eb53a7c4fd435c9a9300560b675a8ff2c32315a5e9303408447fe</aprPatchFileSha256>
|
||
|
<archBits>64</archBits>
|
||
|
<linkStatic>false</linkStatic>
|
||
|
<osxCrossCompile>false</osxCrossCompile>
|
||
|
<sslHome>${project.build.directory}/ssl</sslHome>
|
||
|
<msvcSslIncludeDirs>${sslHome}/include</msvcSslIncludeDirs>
|
||
|
<msvcSslLibDirs>${sslHome}/lib</msvcSslLibDirs>
|
||
|
<msvcSslLibs>libssl.lib;libcrypto.lib</msvcSslLibs>
|
||
|
<strip.skip>false</strip.skip>
|
||
|
<generatedSourcesDir>${project.build.directory}/generated-sources</generatedSourcesDir>
|
||
|
<macOsxDeploymentTarget>MACOSX_DEPLOYMENT_TARGET=10.9</macOsxDeploymentTarget>
|
||
|
<cmakeOsxDeploymentTarget>-DCMAKE_OSX_DEPLOYMENT_TARGET=10.9</cmakeOsxDeploymentTarget>
|
||
|
<jniArch>${os.detected.arch}</jniArch>
|
||
|
<jniClassifier>${os.detected.name}-${os.detected.arch}</jniClassifier>
|
||
|
<skipJapicmp>false</skipJapicmp>
|
||
|
<compileLibrary>false</compileLibrary>
|
||
|
<jniUtilIncludeDir>${project.build.directory}/netty-jni-util/</jniUtilIncludeDir>
|
||
|
<jniUtilVersion>0.0.6.Final</jniUtilVersion>
|
||
|
<javaDefaultModuleName>io.netty.internal.tcnative</javaDefaultModuleName>
|
||
|
<javaModuleName>${javaDefaultModuleName}</javaModuleName>
|
||
|
<javaModuleNameClassifier>${os.detected.name}.${os.detected.arch}</javaModuleNameClassifier>
|
||
|
<javaModuleNameNative>${javaDefaultModuleName}.openssl.${javaModuleNameClassifier}</javaModuleNameNative>
|
||
|
</properties>
|
||
|
|
||
|
<build>
|
||
|
<resources>
|
||
|
<resource>
|
||
|
<directory>src/main/resources</directory>
|
||
|
<filtering>true</filtering>
|
||
|
</resource>
|
||
|
</resources>
|
||
|
|
||
|
<extensions>
|
||
|
<!-- Generate os.detected.classifier property -->
|
||
|
<extension>
|
||
|
<groupId>kr.motd.maven</groupId>
|
||
|
<artifactId>os-maven-plugin</artifactId>
|
||
|
<version>1.6.2</version>
|
||
|
</extension>
|
||
|
</extensions>
|
||
|
|
||
|
<pluginManagement>
|
||
|
<plugins>
|
||
|
<plugin>
|
||
|
<groupId>org.codehaus.mojo</groupId>
|
||
|
<artifactId>build-helper-maven-plugin</artifactId>
|
||
|
<version>3.2.0</version>
|
||
|
</plugin>
|
||
|
<plugin>
|
||
|
<artifactId>maven-enforcer-plugin</artifactId>
|
||
|
<version>${enforcer.plugin.version}</version>
|
||
|
<dependencies>
|
||
|
<!-- Provides the 'requireFilesContent' enforcer rule. -->
|
||
|
<dependency>
|
||
|
<groupId>com.ceilfors.maven.plugin</groupId>
|
||
|
<artifactId>enforcer-rules</artifactId>
|
||
|
<version>1.2.0</version>
|
||
|
</dependency>
|
||
|
</dependencies>
|
||
|
</plugin>
|
||
|
<plugin>
|
||
|
<groupId>org.fusesource.hawtjni</groupId>
|
||
|
<artifactId>maven-hawtjni-plugin</artifactId>
|
||
|
<version>1.11</version>
|
||
|
</plugin>
|
||
|
<plugin>
|
||
|
<artifactId>maven-scm-plugin</artifactId>
|
||
|
<version>1.11.2</version>
|
||
|
</plugin>
|
||
|
<plugin>
|
||
|
<artifactId>maven-deploy-plugin</artifactId>
|
||
|
<version>2.8.2</version>
|
||
|
</plugin>
|
||
|
<plugin>
|
||
|
<groupId>org.codehaus.mojo</groupId>
|
||
|
<artifactId>buildnumber-maven-plugin</artifactId>
|
||
|
<version>1.4</version>
|
||
|
</plugin>
|
||
|
<plugin>
|
||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||
|
<version>3.1.2</version>
|
||
|
</plugin>
|
||
|
<plugin>
|
||
|
<artifactId>maven-antrun-plugin</artifactId>
|
||
|
<version>1.8</version>
|
||
|
<dependencies>
|
||
|
<dependency>
|
||
|
<groupId>org.apache.ant</groupId>
|
||
|
<artifactId>ant</artifactId>
|
||
|
<version>1.10.11</version>
|
||
|
</dependency>
|
||
|
<dependency>
|
||
|
<groupId>org.apache.ant</groupId>
|
||
|
<artifactId>ant-commons-net</artifactId>
|
||
|
<version>1.9.6</version>
|
||
|
</dependency>
|
||
|
<dependency>
|
||
|
<groupId>ant-contrib</groupId>
|
||
|
<artifactId>ant-contrib</artifactId>
|
||
|
<version>1.0b3</version>
|
||
|
</dependency>
|
||
|
</dependencies>
|
||
|
</plugin>
|
||
|
</plugins>
|
||
|
</pluginManagement>
|
||
|
|
||
|
<plugins>
|
||
|
<plugin>
|
||
|
<groupId>org.apache.maven.plugins</groupId>
|
||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||
|
<version>3.3.1</version>
|
||
|
<executions>
|
||
|
<execution>
|
||
|
<id>attach-javadocs</id>
|
||
|
<goals>
|
||
|
<goal>jar</goal>
|
||
|
</goals>
|
||
|
<configuration>
|
||
|
<additionalparam>-Xdoclint:none</additionalparam>
|
||
|
</configuration>
|
||
|
</execution>
|
||
|
</executions>
|
||
|
</plugin>
|
||
|
<plugin>
|
||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||
|
<version>3.8.1</version>
|
||
|
<configuration>
|
||
|
<source>${maven.compiler.source}</source>
|
||
|
<target>${maven.compiler.target}</target>
|
||
|
</configuration>
|
||
|
</plugin>
|
||
|
|
||
|
<plugin>
|
||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||
|
<version>2.22.2</version>
|
||
|
<configuration combine.self="override">
|
||
|
<includes>
|
||
|
<include>**/*Test*.java</include>
|
||
|
<include>**/*Benchmark*.java</include>
|
||
|
</includes>
|
||
|
<excludes>
|
||
|
<exclude>**/Abstract*</exclude>
|
||
|
<exclude>**/*TestUtil*</exclude>
|
||
|
</excludes>
|
||
|
<runOrder>random</runOrder>
|
||
|
<properties>
|
||
|
<property>
|
||
|
<name>listener</name>
|
||
|
<value>io.netty.build.junit.TimedOutTestsListener</value>
|
||
|
</property>
|
||
|
</properties>
|
||
|
<!-- Ensure the whole stacktrace is preserved when an exception is thrown. See https://issues.apache.org/jira/browse/SUREFIRE-1457 -->
|
||
|
<trimStackTrace>false</trimStackTrace>
|
||
|
</configuration>
|
||
|
</plugin>
|
||
|
|
||
|
<plugin>
|
||
|
<groupId>com.github.siom79.japicmp</groupId>
|
||
|
<artifactId>japicmp-maven-plugin</artifactId>
|
||
|
<version>0.15.4</version>
|
||
|
<configuration>
|
||
|
<parameter>
|
||
|
<ignoreMissingOldVersion>true</ignoreMissingOldVersion>
|
||
|
<breakBuildOnBinaryIncompatibleModifications>true</breakBuildOnBinaryIncompatibleModifications>
|
||
|
<breakBuildOnSourceIncompatibleModifications>true</breakBuildOnSourceIncompatibleModifications>
|
||
|
<oldVersionPattern>\d+\.\d+\.\d+\.Final</oldVersionPattern>
|
||
|
</parameter>
|
||
|
<skip>${skipJapicmp}</skip>
|
||
|
</configuration>
|
||
|
<executions>
|
||
|
<execution>
|
||
|
<phase>package</phase>
|
||
|
<goals>
|
||
|
<goal>cmp</goal>
|
||
|
</goals>
|
||
|
</execution>
|
||
|
</executions>
|
||
|
</plugin>
|
||
|
|
||
|
<plugin>
|
||
|
<groupId>org.apache.maven.plugins</groupId>
|
||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||
|
<executions>
|
||
|
<!-- unpack netty-jni-util files -->
|
||
|
<execution>
|
||
|
<id>unpack</id>
|
||
|
<phase>generate-sources</phase>
|
||
|
<goals>
|
||
|
<goal>unpack-dependencies</goal>
|
||
|
</goals>
|
||
|
<configuration>
|
||
|
<includeGroupIds>io.netty</includeGroupIds>
|
||
|
<includeArtifactIds>netty-jni-util</includeArtifactIds>
|
||
|
<classifier>sources</classifier>
|
||
|
<outputDirectory>${jniUtilIncludeDir}</outputDirectory>
|
||
|
<includes>**.h,**.c</includes>
|
||
|
<overWriteReleases>false</overWriteReleases>
|
||
|
<overWriteSnapshots>true</overWriteSnapshots>
|
||
|
</configuration>
|
||
|
</execution>
|
||
|
</executions>
|
||
|
</plugin>
|
||
|
|
||
|
<plugin>
|
||
|
<artifactId>maven-antrun-plugin</artifactId>
|
||
|
<executions>
|
||
|
<execution>
|
||
|
<id>copy-src</id>
|
||
|
<phase>generate-sources</phase>
|
||
|
<goals>
|
||
|
<goal>run</goal>
|
||
|
</goals>
|
||
|
<configuration>
|
||
|
<target if="${compileLibrary}">
|
||
|
<!-- Copy all of the code from the dynamic module -->
|
||
|
<delete dir="${generatedSourcesDir}" quiet="true" />
|
||
|
<copy todir="${generatedSourcesDir}" verbose="true">
|
||
|
<fileset dir="${opensslDynamicDir}/src/main" />
|
||
|
</copy>
|
||
|
|
||
|
<copy todir="${generatedSourcesDir}/c" verbose="true">
|
||
|
<fileset dir="${jniUtilIncludeDir}" />
|
||
|
</copy>
|
||
|
</target>
|
||
|
</configuration>
|
||
|
</execution>
|
||
|
<!-- Generate the source for a statically-linked modules by copying from the template -->
|
||
|
<execution>
|
||
|
<id>setup-template</id>
|
||
|
<phase>generate-sources</phase>
|
||
|
<goals>
|
||
|
<goal>run</goal>
|
||
|
</goals>
|
||
|
<configuration>
|
||
|
<target if="${linkStatic}">
|
||
|
|
||
|
<!-- Convert the paths to windows format -->
|
||
|
<pathconvert property="aprHomeWindowsPath" targetos="windows">
|
||
|
<path location="${aprHome}" />
|
||
|
</pathconvert>
|
||
|
<pathconvert property="sslIncludeDirsWindowsPath" targetos="windows">
|
||
|
<path location="${msvcSslIncludeDirs}" />
|
||
|
</pathconvert>
|
||
|
<pathconvert property="sslLibDirsWindowsPath" targetos="windows">
|
||
|
<path location="${msvcSslLibDirs}" />
|
||
|
</pathconvert>
|
||
|
<property name="aprIncludeDir" value="${aprHomeWindowsPath}\include" />
|
||
|
<property name="aprLibDir" value="${aprHomeWindowsPath}\lib" />
|
||
|
|
||
|
<echo message="Setting APR_INCLUDE_DIR=${aprIncludeDir}" />
|
||
|
<echo message="Setting APR_LIB_DIR=${aprLibDir}" />
|
||
|
<echo message="Setting SSL_INCLUDE_DIRS=${sslIncludeDirsWindowsPath}" />
|
||
|
<echo message="Setting SSL_LIB_DIRS=${sslLibDirsWindowsPath}" />
|
||
|
<echo message="Setting SSL_LIBS=${msvcSslLibs}" />
|
||
|
|
||
|
<!-- Copy and filter the template MSVC project -->
|
||
|
<filter token="APR_INCLUDE_DIR" value="${aprIncludeDir}" />
|
||
|
<filter token="APR_LIB_DIR" value="${aprLibDir}" />
|
||
|
<filter token="SSL_INCLUDE_DIRS" value="${sslIncludeDirsWindowsPath}" />
|
||
|
<filter token="SSL_LIB_DIR" value="${sslLibDirsWindowsPath}" />
|
||
|
<filter token="SSL_LIBS" value="${msvcSslLibs}" />
|
||
|
<copy file="${vsStaticTemplateFile}" tofile="${generatedSourcesDir}/native-package/vs2010.vcxproj" filtering="true" overwrite="true" verbose="true" />
|
||
|
</target>
|
||
|
</configuration>
|
||
|
</execution>
|
||
|
|
||
|
<!-- Generate bnd bundle manifest. -->
|
||
|
<execution>
|
||
|
<id>native-manifest</id>
|
||
|
<phase>initialize</phase>
|
||
|
<goals>
|
||
|
<goal>run</goal>
|
||
|
</goals>
|
||
|
<configuration>
|
||
|
<exportAntProperties>true</exportAntProperties>
|
||
|
<target>
|
||
|
<condition property="tcnative.snippet" value="libnetty_tcnative_${nativeLibOsParts}.so;osname=linux">
|
||
|
<equals arg1="${os.detected.name}" arg2="linux" />
|
||
|
</condition>
|
||
|
<!-- In OSGi specification, the alias of Windows family is win32, case insensitive -->
|
||
|
<condition property="tcnative.snippet" value="netty_tcnative_${nativeLibOsParts}.dll;osname=win32">
|
||
|
<equals arg1="${os.detected.name}" arg2="windows" />
|
||
|
</condition>
|
||
|
<!-- In OSGi specification, the alias of OSX family is macos or macosx, case insensitive -->
|
||
|
<condition property="tcnative.snippet" value="libnetty_tcnative_${nativeLibOsParts}.jnilib;osname=macosx;">
|
||
|
<equals arg1="${os.detected.name}" arg2="osx" />
|
||
|
</condition>
|
||
|
|
||
|
<!-- In OSGi specification, the alias of x86_32 is x86 -->
|
||
|
<condition property="nativeCode.processor" value="x86" else="${os.detected.arch}">
|
||
|
<equals arg1="${os.detected.arch}" arg2="x86_32" />
|
||
|
</condition>
|
||
|
|
||
|
<property name="tcnativeManifest" value="META-INF/native/${tcnative.snippet};processor=${nativeCode.processor}" />
|
||
|
<echo message="Bundle-NativeCode: ${tcnativeManifest}" />
|
||
|
|
||
|
</target>
|
||
|
</configuration>
|
||
|
</execution>
|
||
|
</executions>
|
||
|
</plugin>
|
||
|
|
||
|
<!-- This artifact exports the classes whose names are different from the artifactId. -->
|
||
|
<plugin>
|
||
|
<groupId>org.apache.felix</groupId>
|
||
|
<artifactId>maven-bundle-plugin</artifactId>
|
||
|
<version>5.1.1</version>
|
||
|
<executions>
|
||
|
<execution>
|
||
|
<id>generate-manifest</id>
|
||
|
<phase>process-classes</phase>
|
||
|
<goals>
|
||
|
<goal>manifest</goal>
|
||
|
</goals>
|
||
|
<configuration>
|
||
|
<supportedProjectTypes>
|
||
|
<supportedProjectType>jar</supportedProjectType>
|
||
|
</supportedProjectTypes>
|
||
|
<instructions>
|
||
|
<Export-Package>io.netty.internal.tcnative.*</Export-Package>
|
||
|
</instructions>
|
||
|
</configuration>
|
||
|
</execution>
|
||
|
</executions>
|
||
|
</plugin>
|
||
|
<plugin>
|
||
|
<artifactId>maven-jar-plugin</artifactId>
|
||
|
<version>3.0.2</version>
|
||
|
<executions>
|
||
|
<execution>
|
||
|
<id>default-jar</id>
|
||
|
<configuration>
|
||
|
<archive>
|
||
|
<manifest>
|
||
|
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
|
||
|
</manifest>
|
||
|
<manifestEntries>
|
||
|
<Automatic-Module-Name>${javaModuleName}</Automatic-Module-Name>
|
||
|
</manifestEntries>
|
||
|
<index>true</index>
|
||
|
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
|
||
|
</archive>
|
||
|
</configuration>
|
||
|
</execution>
|
||
|
</executions>
|
||
|
</plugin>
|
||
|
<!-- Override the parent POM's configuration -->
|
||
|
<plugin>
|
||
|
<artifactId>maven-release-plugin</artifactId>
|
||
|
<configuration>
|
||
|
<!-- Specifying a profile here will disable the all profile, since it's activeByDefault -->
|
||
|
<arguments>-Prestricted-release,sonatype-oss-release -DmoduleSelector=none</arguments>
|
||
|
<tagNameFormat>@{project.artifactId}-@{project.version}</tagNameFormat>
|
||
|
<autoVersionSubmodules>true</autoVersionSubmodules>
|
||
|
</configuration>
|
||
|
</plugin>
|
||
|
</plugins>
|
||
|
</build>
|
||
|
|
||
|
<dependencies>
|
||
|
<dependency>
|
||
|
<groupId>io.netty</groupId>
|
||
|
<artifactId>netty-jni-util</artifactId>
|
||
|
<version>${jniUtilVersion}</version>
|
||
|
<classifier>sources</classifier>
|
||
|
<optional>true</optional>
|
||
|
</dependency>
|
||
|
<dependency>
|
||
|
<groupId>io.netty</groupId>
|
||
|
<artifactId>netty-build-common</artifactId>
|
||
|
<version>${netty.build.version}</version>
|
||
|
<scope>test</scope>
|
||
|
</dependency>
|
||
|
</dependencies>
|
||
|
<profiles>
|
||
|
<profile>
|
||
|
<id>disable-autogen-windows</id>
|
||
|
<activation>
|
||
|
<os>
|
||
|
<family>windows</family>
|
||
|
</os>
|
||
|
</activation>
|
||
|
</profile>
|
||
|
|
||
|
<!-- Build the static APR library -->
|
||
|
<profile>
|
||
|
<id>build-apr-windows</id>
|
||
|
<activation>
|
||
|
<os>
|
||
|
<family>windows</family>
|
||
|
</os>
|
||
|
</activation>
|
||
|
<properties>
|
||
|
<!--
|
||
|
We use APR 1.6.5 on windows as 1.7.0 doesn't compile anymore on the platforms we support
|
||
|
See also https://programmersought.com/article/94732742066/
|
||
|
-->
|
||
|
<aprVersion>1.6.5</aprVersion>
|
||
|
<aprSha256>70dcf9102066a2ff2ffc47e93c289c8e54c95d8dda23b503f9e61bb0cbd2d105</aprSha256>
|
||
|
</properties>
|
||
|
<build>
|
||
|
<plugins>
|
||
|
<plugin>
|
||
|
<artifactId>maven-antrun-plugin</artifactId>
|
||
|
<executions>
|
||
|
<execution>
|
||
|
<id>source-apr</id>
|
||
|
<phase>generate-sources</phase>
|
||
|
<goals>
|
||
|
<goal>run</goal>
|
||
|
</goals>
|
||
|
<configuration>
|
||
|
<target if="${linkStatic}">
|
||
|
<!-- Add the ant tasks from ant-contrib -->
|
||
|
<taskdef resource="net/sf/antcontrib/antcontrib.properties" />
|
||
|
|
||
|
<if>
|
||
|
<available file="${aprSourceDir}" />
|
||
|
<then>
|
||
|
<echo message="APR was already downloaded, skipping the build step." />
|
||
|
</then>
|
||
|
<else>
|
||
|
<echo message="Downloading APR" />
|
||
|
|
||
|
<property name="aprArchiveFile" value="apr-${aprVersion}-win32-src.zip" />
|
||
|
<get src="https://archive.apache.org/dist/apr/${aprArchiveFile}" dest="${project.build.directory}/${aprArchiveFile}" verbose="on" />
|
||
|
<unzip src="${project.build.directory}/${aprArchiveFile}" dest="${project.build.directory}" />
|
||
|
<condition property="windowsRelease" value="Win32 Release" else="x64 Release">
|
||
|
<equals arg1="${archBits}" arg2="32" />
|
||
|
</condition>
|
||
|
<move file="${project.build.directory}/apr-${aprVersion}" tofile="${aprSourceDir}" />
|
||
|
</else>
|
||
|
</if>
|
||
|
</target>
|
||
|
</configuration>
|
||
|
</execution>
|
||
|
<execution>
|
||
|
<id>build-apr</id>
|
||
|
<phase>compile</phase>
|
||
|
<goals>
|
||
|
<goal>run</goal>
|
||
|
</goals>
|
||
|
<configuration>
|
||
|
<target if="${linkStatic}">
|
||
|
<!-- Add the ant tasks from ant-contrib -->
|
||
|
<taskdef resource="net/sf/antcontrib/antcontrib.properties" />
|
||
|
|
||
|
<if>
|
||
|
<available file="${aprHome}" />
|
||
|
<then>
|
||
|
<echo message="APR was already build, skipping the build step." />
|
||
|
</then>
|
||
|
<else>
|
||
|
<echo message="Building APR" />
|
||
|
|
||
|
<condition property="windowsRelease" value="Win32 Release" else="x64 Release">
|
||
|
<equals arg1="${archBits}" arg2="32" />
|
||
|
</condition>
|
||
|
<echo message="archBits=${archBits}. Using windowsRelease=${windowsRelease}" />
|
||
|
<!-- On Windows, force building APR with /MT for static linking -->
|
||
|
<replace dir="${aprSourceDir}" token="/MD" value="/MT">
|
||
|
<include name="*.mak" />
|
||
|
</replace>
|
||
|
<retry retrycount="3">
|
||
|
<exec executable="nmake" failonerror="true" dir="${aprSourceDir}" resolveexecutable="true">
|
||
|
<arg line="/f Makefile.win ARCH="${windowsRelease}" PREFIX=..\apr buildall install" />
|
||
|
</exec>
|
||
|
</retry>
|
||
|
<copy todir="${aprHome}/include">
|
||
|
<fileset dir="${aprSourceDir}/include/arch/win32" includes="*.h" />
|
||
|
</copy>
|
||
|
<copy todir="${aprHome}">
|
||
|
<fileset dir="${aprSourceDir}/include/arch" includes="*.h" />
|
||
|
</copy>
|
||
|
</else>
|
||
|
</if>
|
||
|
</target>
|
||
|
</configuration>
|
||
|
</execution>
|
||
|
</executions>
|
||
|
</plugin>
|
||
|
</plugins>
|
||
|
</build>
|
||
|
</profile>
|
||
|
<profile>
|
||
|
<id>build-apr-linux-mac</id>
|
||
|
<activation>
|
||
|
<os>
|
||
|
<family>!windows</family>
|
||
|
</os>
|
||
|
</activation>
|
||
|
<build>
|
||
|
<plugins>
|
||
|
<plugin>
|
||
|
<artifactId>maven-antrun-plugin</artifactId>
|
||
|
<executions>
|
||
|
<execution>
|
||
|
<id>source-apr-linux-mac</id>
|
||
|
<phase>generate-sources</phase>
|
||
|
<goals>
|
||
|
<goal>run</goal>
|
||
|
</goals>
|
||
|
<configuration>
|
||
|
<target if="${linkStatic}">
|
||
|
<!-- Add the ant tasks from ant-contrib -->
|
||
|
<taskdef resource="net/sf/antcontrib/antcontrib.properties" />
|
||
|
|
||
|
<if>
|
||
|
<available file="${aprSourceDir}" />
|
||
|
<then>
|
||
|
<echo message="APR was already downloaded, skipping the build step." />
|
||
|
</then>
|
||
|
<else>
|
||
|
<echo message="Downloading and unpacking APR" />
|
||
|
|
||
|
<property name="aprTarGzFile" value="apr-${aprVersion}.tar.gz" />
|
||
|
<property name="aprTarFile" value="apr-${aprVersion}.tar" />
|
||
|
<get src="https://archive.apache.org/dist/apr/${aprTarGzFile}" dest="${project.build.directory}/${aprTarGzFile}" verbose="on" />
|
||
|
<checksum file="${project.build.directory}/${aprTarGzFile}" algorithm="SHA-256" property="${aprSha256}" verifyProperty="isEqual" />
|
||
|
<gunzip src="${project.build.directory}/${aprTarGzFile}" dest="${project.build.directory}" />
|
||
|
<!-- Use the tar command (rather than the untar ant task) in order to preserve file permissions. -->
|
||
|
<exec executable="tar" failonerror="true" dir="${project.build.directory}/" resolveexecutable="true">
|
||
|
<arg line="xfvz ${aprTarGzFile}" />
|
||
|
</exec>
|
||
|
<move file="${project.build.directory}/apr-${aprVersion}" tofile="${aprSourceDir}" />
|
||
|
</else>
|
||
|
</if>
|
||
|
</target>
|
||
|
</configuration>
|
||
|
</execution>
|
||
|
<execution>
|
||
|
<id>build-apr-linux-mac</id>
|
||
|
<phase>compile</phase>
|
||
|
<goals>
|
||
|
<goal>run</goal>
|
||
|
</goals>
|
||
|
<configuration>
|
||
|
<target if="${linkStatic}">
|
||
|
<!-- Add the ant tasks from ant-contrib -->
|
||
|
<taskdef resource="net/sf/antcontrib/antcontrib.properties" />
|
||
|
|
||
|
<if>
|
||
|
<available file="${aprHome}" />
|
||
|
<then>
|
||
|
<echo message="APR was already build, skipping the build step." />
|
||
|
</then>
|
||
|
<else>
|
||
|
<echo message="Building APR" />
|
||
|
<mkdir dir="${aprHome}" />
|
||
|
|
||
|
<!--
|
||
|
We need to patch APR on macOS to be able to compile it on macOS 11 as well.
|
||
|
Let's just re-use the same patch that homebrew is using
|
||
|
https://github.com/Homebrew/homebrew-core/pull/56849
|
||
|
|
||
|
This should be removed again once apr 1.7.1 was released with the fix included.
|
||
|
-->
|
||
|
<if>
|
||
|
<equals arg1="${os.detected.name}" arg2="osx" />
|
||
|
<then>
|
||
|
<echo message="Patching APR to make it's build scripts work on macOS 11" />
|
||
|
<get src="https://raw.githubusercontent.com/Homebrew/formula-patches/7e2246542543bbd3111a4ec29f801e6e4d538f88/apr/${aprPatchFile}" dest="${project.build.directory}/${aprPatchFile}" verbose="on" />
|
||
|
<checksum file="${project.build.directory}/${aprPatchFile}" algorithm="SHA-256" property="${aprPatchFileSha256}" verifyProperty="isEqual" />
|
||
|
<patch patchfile="${project.build.directory}/${aprPatchFile}" strip="0" dir="${aprSourceDir}" />
|
||
|
<exec executable="buildconf" failonerror="true" dir="${aprSourceDir}" resolveexecutable="true" />
|
||
|
</then>
|
||
|
</if>
|
||
|
|
||
|
<if>
|
||
|
<equals arg1="${osxCrossCompile}" arg2="true" />
|
||
|
<then>
|
||
|
<!--
|
||
|
+ We need to set some extra variables as otherwise the configure of apr will fail when trying to cross-compile.
|
||
|
+ See https://stackoverflow.com/a/1605497/1074097
|
||
|
+ -->
|
||
|
<exec executable="configure" failonerror="true" dir="${aprSourceDir}" resolveexecutable="true">
|
||
|
<arg line="--disable-shared --prefix=${aprHome} CFLAGS='-O3 -fno-omit-frame-pointer -fPIC -target arm64-apple-macos11' --host=aarch64-apple-darwin ${macOsxDeploymentTarget} ac_cv_file__dev_zero=yes apr_cv_process_shared_works=yes apr_cv_mutex_robust_shared=no apr_cv_tcp_nodelay_with_cork=yes ${macOsxDeploymentTarget}" />
|
||
|
</exec>
|
||
|
<!--
|
||
|
Make will fail when it tries to use the gen_test_char program.
|
||
|
We work around this by compile gen_test_char separate, execute and than rerun make.
|
||
|
See https://stackoverflow.com/a/56262330/1074097
|
||
|
-->
|
||
|
<exec executable="make" failonerror="false" dir="${aprSourceDir}" resolveexecutable="true" />
|
||
|
<exec executable="gcc" failonerror="true" dir="${aprSourceDir}" resolveexecutable="true">
|
||
|
<arg line="-Wall -O2 -DCROSS_COMPILE tools/gen_test_char.c -o tools/gen_test_char" />
|
||
|
</exec>
|
||
|
<exec executable="tools/gen_test_char" failonerror="true" dir="${aprSourceDir}" resolveexecutable="true" output="${aprSourceDir}/include/private/apr_escape_test_char.h" />
|
||
|
<exec executable="make" failonerror="true" dir="${aprSourceDir}" resolveexecutable="true" />
|
||
|
<exec executable="make" failonerror="true" dir="${aprSourceDir}" resolveexecutable="true">
|
||
|
<arg line="install" />
|
||
|
</exec>
|
||
|
</then>
|
||
|
<else>
|
||
|
<exec executable="configure" failonerror="true" dir="${aprSourceDir}" resolveexecutable="true">
|
||
|
<arg line="--disable-shared --prefix=${aprHome} CFLAGS='-O3 -fno-omit-frame-pointer -fPIC' ${macOsxDeploymentTarget}" />
|
||
|
</exec>
|
||
|
<exec executable="make" failonerror="true" dir="${aprSourceDir}" resolveexecutable="true" />
|
||
|
<exec executable="make" failonerror="true" dir="${aprSourceDir}" resolveexecutable="true">
|
||
|
<arg line="install" />
|
||
|
</exec>
|
||
|
</else>
|
||
|
</if>
|
||
|
|
||
|
</else>
|
||
|
</if>
|
||
|
</target>
|
||
|
</configuration>
|
||
|
</execution>
|
||
|
</executions>
|
||
|
</plugin>
|
||
|
</plugins>
|
||
|
</build>
|
||
|
</profile>
|
||
|
|
||
|
<!--
|
||
|
netty-tcnative must be released from RHEL 6.6 x86_64 or compatible so that:
|
||
|
|
||
|
1) we ship x86_64 version of epoll transport officially, and
|
||
|
2) we ensure the ABI compatibility with older GLIBC versions.
|
||
|
|
||
|
The shared library built on a distribution with newer GLIBC
|
||
|
will not run on older distributions.
|
||
|
-->
|
||
|
<profile>
|
||
|
<id>restricted-release</id>
|
||
|
<build>
|
||
|
<plugins>
|
||
|
<plugin>
|
||
|
<artifactId>maven-enforcer-plugin</artifactId>
|
||
|
<executions>
|
||
|
<execution>
|
||
|
<id>enforce-release-environment</id>
|
||
|
<goals>
|
||
|
<goal>enforce</goal>
|
||
|
</goals>
|
||
|
<configuration>
|
||
|
<rules>
|
||
|
<requireJavaVersion>
|
||
|
<!-- Enforce JDK 1.8+ for compilation. -->
|
||
|
<!-- This is needed because of java.util.zip.Deflater and NIO UDP multicast. -->
|
||
|
<version>[1.8.0,)</version>
|
||
|
</requireJavaVersion>
|
||
|
<requireProperty>
|
||
|
<regexMessage>
|
||
|
Release process must be performed on linux-x86_64.
|
||
|
</regexMessage>
|
||
|
<property>os.detected.classifier</property>
|
||
|
<regex>^linux-x86_64$</regex>
|
||
|
</requireProperty>
|
||
|
<requireFilesContent>
|
||
|
<message>
|
||
|
Release process must be performed on RHEL 6.8 or its derivatives.
|
||
|
</message>
|
||
|
<files>
|
||
|
<file>/etc/redhat-release</file>
|
||
|
</files>
|
||
|
<content>release 6.</content>
|
||
|
</requireFilesContent>
|
||
|
</rules>
|
||
|
</configuration>
|
||
|
</execution>
|
||
|
</executions>
|
||
|
<dependencies>
|
||
|
<!-- Provides the 'requireFilesContent' enforcer rule. -->
|
||
|
<dependency>
|
||
|
<groupId>com.ceilfors.maven.plugin</groupId>
|
||
|
<artifactId>enforcer-rules</artifactId>
|
||
|
<version>1.2.0</version>
|
||
|
</dependency>
|
||
|
</dependencies>
|
||
|
</plugin>
|
||
|
</plugins>
|
||
|
</build>
|
||
|
<modules>
|
||
|
<!-- When doing a release we only want to deploy dynamic openssl version and the static boring one. -->
|
||
|
<module>openssl-classes</module>
|
||
|
<module>openssl-dynamic</module>
|
||
|
<module>boringssl-static</module>
|
||
|
</modules>
|
||
|
</profile>
|
||
|
|
||
|
<profile>
|
||
|
<id>stage</id>
|
||
|
<modules>
|
||
|
<!-- When stage we only want to deploy dynamic openssl version and the static boring one. -->
|
||
|
<module>openssl-classes</module>
|
||
|
<module>openssl-dynamic</module>
|
||
|
<module>boringssl-static</module>
|
||
|
</modules>
|
||
|
</profile>
|
||
|
|
||
|
<!--
|
||
|
Profile for building all modules. This is enabled by default so if any profile is manually specified,
|
||
|
this will be disabled automatically.
|
||
|
-->
|
||
|
<profile>
|
||
|
<id>all</id>
|
||
|
<activation>
|
||
|
<property>
|
||
|
<name>!moduleSelector</name>
|
||
|
</property>
|
||
|
</activation>
|
||
|
<modules>
|
||
|
<module>openssl-classes</module>
|
||
|
<module>openssl-dynamic</module>
|
||
|
<module>openssl-static</module>
|
||
|
<module>boringssl-static</module>
|
||
|
<module>libressl-static</module>
|
||
|
</modules>
|
||
|
</profile>
|
||
|
|
||
|
<profile>
|
||
|
<id>java9</id>
|
||
|
<activation>
|
||
|
<jdk>9</jdk>
|
||
|
</activation>
|
||
|
<properties>
|
||
|
<!-- Needed because of https://issues.apache.org/jira/browse/MENFORCER-275 -->
|
||
|
<enforcer.plugin.version>3.0.0</enforcer.plugin.version>
|
||
|
</properties>
|
||
|
</profile>
|
||
|
|
||
|
<profile>
|
||
|
<id>java10</id>
|
||
|
<activation>
|
||
|
<jdk>10</jdk>
|
||
|
</activation>
|
||
|
<properties>
|
||
|
<!-- Needed because of https://issues.apache.org/jira/browse/MENFORCER-275 -->
|
||
|
<enforcer.plugin.version>3.0.0</enforcer.plugin.version>
|
||
|
</properties>
|
||
|
</profile>
|
||
|
|
||
|
<profile>
|
||
|
<id>java11</id>
|
||
|
<activation>
|
||
|
<jdk>11</jdk>
|
||
|
</activation>
|
||
|
<properties>
|
||
|
<!-- Needed because of https://issues.apache.org/jira/browse/MENFORCER-275 -->
|
||
|
<enforcer.plugin.version>3.0.0</enforcer.plugin.version>
|
||
|
</properties>
|
||
|
</profile>
|
||
|
|
||
|
<profile>
|
||
|
<id>java12</id>
|
||
|
<activation>
|
||
|
<jdk>12</jdk>
|
||
|
</activation>
|
||
|
<properties>
|
||
|
<!-- Needed because of https://issues.apache.org/jira/browse/MENFORCER-275 -->
|
||
|
<enforcer.plugin.version>3.0.0</enforcer.plugin.version>
|
||
|
|
||
|
<!-- This is the minimum supported by Java12 -->
|
||
|
<maven.compiler.source>1.7</maven.compiler.source>
|
||
|
<maven.compiler.target>1.7</maven.compiler.target>
|
||
|
</properties>
|
||
|
</profile>
|
||
|
|
||
|
<profile>
|
||
|
<id>java13</id>
|
||
|
<activation>
|
||
|
<jdk>13</jdk>
|
||
|
</activation>
|
||
|
<properties>
|
||
|
<!-- Needed because of https://issues.apache.org/jira/browse/MENFORCER-275 -->
|
||
|
<enforcer.plugin.version>3.0.0</enforcer.plugin.version>
|
||
|
|
||
|
<!-- This is the minimum supported by Java12 -->
|
||
|
<maven.compiler.source>1.7</maven.compiler.source>
|
||
|
<maven.compiler.target>1.7</maven.compiler.target>
|
||
|
</properties>
|
||
|
</profile>
|
||
|
|
||
|
<profile>
|
||
|
<id>java14</id>
|
||
|
<activation>
|
||
|
<jdk>14</jdk>
|
||
|
</activation>
|
||
|
<properties>
|
||
|
<!-- Needed because of https://issues.apache.org/jira/browse/MENFORCER-275 -->
|
||
|
<enforcer.plugin.version>3.0.0</enforcer.plugin.version>
|
||
|
|
||
|
<!-- This is the minimum supported by Java12 -->
|
||
|
<maven.compiler.source>1.7</maven.compiler.source>
|
||
|
<maven.compiler.target>1.7</maven.compiler.target>
|
||
|
</properties>
|
||
|
</profile>
|
||
|
|
||
|
<profile>
|
||
|
<id>java15</id>
|
||
|
<activation>
|
||
|
<jdk>15</jdk>
|
||
|
</activation>
|
||
|
<properties>
|
||
|
<!-- Needed because of https://issues.apache.org/jira/browse/MENFORCER-275 -->
|
||
|
<enforcer.plugin.version>3.0.0</enforcer.plugin.version>
|
||
|
|
||
|
<!-- This is the minimum supported by Java12 -->
|
||
|
<maven.compiler.source>1.7</maven.compiler.source>
|
||
|
<maven.compiler.target>1.7</maven.compiler.target>
|
||
|
</properties>
|
||
|
</profile>
|
||
|
|
||
|
<profile>
|
||
|
<id>java16</id>
|
||
|
<activation>
|
||
|
<jdk>16</jdk>
|
||
|
</activation>
|
||
|
<properties>
|
||
|
<!-- Needed because of https://issues.apache.org/jira/browse/MENFORCER-275 -->
|
||
|
<enforcer.plugin.version>3.0.0</enforcer.plugin.version>
|
||
|
|
||
|
<!-- This is the minimum supported by Java12 -->
|
||
|
<maven.compiler.source>1.7</maven.compiler.source>
|
||
|
<maven.compiler.target>1.7</maven.compiler.target>
|
||
|
</properties>
|
||
|
</profile>
|
||
|
|
||
|
<profile>
|
||
|
<id>java17</id>
|
||
|
<activation>
|
||
|
<jdk>17</jdk>
|
||
|
</activation>
|
||
|
<properties>
|
||
|
<!-- Needed because of https://issues.apache.org/jira/browse/MENFORCER-275 -->
|
||
|
<enforcer.plugin.version>3.0.0</enforcer.plugin.version>
|
||
|
|
||
|
<!-- This is the minimum supported by Java12 -->
|
||
|
<maven.compiler.source>1.7</maven.compiler.source>
|
||
|
<maven.compiler.target>1.7</maven.compiler.target>
|
||
|
</properties>
|
||
|
</profile>
|
||
|
</profiles>
|
||
|
</project>
|