2016-01-05 22:03:47 +01:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
2014-02-15 22:26:36 +01:00
|
|
|
<!--
|
|
|
|
~ 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>io.netty</groupId>
|
|
|
|
<artifactId>netty-parent</artifactId>
|
2017-01-30 15:14:02 +01:00
|
|
|
<version>4.1.9.Final-SNAPSHOT</version>
|
2014-02-15 22:26:36 +01:00
|
|
|
</parent>
|
|
|
|
<artifactId>netty-transport-native-epoll</artifactId>
|
|
|
|
|
|
|
|
<name>Netty/Transport/Native/Epoll</name>
|
|
|
|
<packaging>jar</packaging>
|
|
|
|
|
2016-06-06 23:51:05 +02:00
|
|
|
<properties>
|
|
|
|
<jni.compiler.args.ldflags>LDFLAGS=-Wl,--no-as-needed -lrt</jni.compiler.args.ldflags>
|
|
|
|
</properties>
|
|
|
|
|
2014-02-15 22:26:36 +01:00
|
|
|
<dependencies>
|
|
|
|
<dependency>
|
|
|
|
<groupId>io.netty</groupId>
|
|
|
|
<artifactId>netty-common</artifactId>
|
|
|
|
<version>${project.version}</version>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>io.netty</groupId>
|
|
|
|
<artifactId>netty-buffer</artifactId>
|
|
|
|
<version>${project.version}</version>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>io.netty</groupId>
|
|
|
|
<artifactId>netty-transport</artifactId>
|
|
|
|
<version>${project.version}</version>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>io.netty</groupId>
|
|
|
|
<artifactId>netty-testsuite</artifactId>
|
|
|
|
<version>${project.version}</version>
|
|
|
|
<scope>test</scope>
|
|
|
|
</dependency>
|
2014-06-21 11:28:07 +02:00
|
|
|
<dependency>
|
|
|
|
<groupId>${project.groupId}</groupId>
|
2016-01-28 19:04:27 +01:00
|
|
|
<artifactId>${tcnative.artifactId}</artifactId>
|
2015-09-18 16:51:04 +02:00
|
|
|
<classifier>${tcnative.classifier}</classifier>
|
2014-06-21 11:28:07 +02:00
|
|
|
<scope>test</scope>
|
|
|
|
</dependency>
|
2014-02-15 22:26:36 +01:00
|
|
|
</dependencies>
|
|
|
|
|
|
|
|
<build>
|
|
|
|
<plugins>
|
|
|
|
<plugin>
|
|
|
|
<groupId>org.fusesource.hawtjni</groupId>
|
|
|
|
<artifactId>maven-hawtjni-plugin</artifactId>
|
|
|
|
<executions>
|
|
|
|
<execution>
|
2014-05-01 12:26:51 +02:00
|
|
|
<id>build-native-lib</id>
|
2014-02-15 22:26:36 +01:00
|
|
|
<configuration>
|
2014-05-01 12:26:51 +02:00
|
|
|
<nativeSourceDirectory>${project.basedir}/src/main/c</nativeSourceDirectory>
|
|
|
|
<libDirectory>${project.build.outputDirectory}</libDirectory>
|
|
|
|
<!-- We use Maven's artifact classifier instead.
|
|
|
|
This hack will make the hawtjni plugin to put the native library
|
|
|
|
under 'META-INF/native' rather than 'META-INF/native/${platform}'. -->
|
|
|
|
<platform>.</platform>
|
2014-02-15 22:26:36 +01:00
|
|
|
<forceConfigure>true</forceConfigure>
|
|
|
|
<forceAutogen>true</forceAutogen>
|
2014-09-12 21:30:50 +02:00
|
|
|
<configureArgs>
|
2016-06-06 23:51:05 +02:00
|
|
|
<arg>${jni.compiler.args.ldflags}</arg>
|
|
|
|
<arg>${jni.compiler.args.cflags}</arg>
|
2014-09-12 21:30:50 +02:00
|
|
|
</configureArgs>
|
2014-02-15 22:26:36 +01:00
|
|
|
</configuration>
|
|
|
|
<goals>
|
|
|
|
<goal>generate</goal>
|
|
|
|
<goal>build</goal>
|
|
|
|
</goals>
|
|
|
|
<phase>compile</phase>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
2014-05-01 12:26:51 +02:00
|
|
|
|
|
|
|
<plugin>
|
|
|
|
<artifactId>maven-jar-plugin</artifactId>
|
2014-05-03 10:28:28 +02:00
|
|
|
<executions>
|
|
|
|
<!-- Generate the fallback JAR that does not contain the native library. -->
|
|
|
|
<execution>
|
|
|
|
<id>default-jar</id>
|
|
|
|
<configuration>
|
|
|
|
<excludes>
|
|
|
|
<exclude>META-INF/native/**</exclude>
|
|
|
|
</excludes>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
<!-- Generate the JAR that contains the native library in it. -->
|
|
|
|
<execution>
|
|
|
|
<id>native-jar</id>
|
|
|
|
<goals>
|
|
|
|
<goal>jar</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
2016-05-07 21:41:19 +02:00
|
|
|
<archive>
|
|
|
|
<manifest>
|
|
|
|
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
|
|
|
|
</manifest>
|
2016-07-12 18:06:31 +02:00
|
|
|
<manifestEntries>
|
2016-10-27 22:50:14 +02:00
|
|
|
<Bundle-NativeCode>META-INF/native/libnetty-transport-native-epoll.so; osname=linux; processor=x86_64,*</Bundle-NativeCode>
|
2016-07-12 18:06:31 +02:00
|
|
|
</manifestEntries>
|
2016-05-07 21:41:19 +02:00
|
|
|
<index>true</index>
|
|
|
|
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
|
|
|
|
</archive>
|
2015-09-18 16:51:04 +02:00
|
|
|
<classifier>${epoll.classifier}</classifier>
|
2014-05-03 10:28:28 +02:00
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
2014-05-01 12:26:51 +02:00
|
|
|
</plugin>
|
2014-09-12 21:30:50 +02:00
|
|
|
|
|
|
|
<plugin>
|
|
|
|
<artifactId>maven-antrun-plugin</artifactId>
|
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<!-- Phase must be before regex-glibc-sendmmsg and regex-linux-sendmmsg -->
|
|
|
|
<phase>validate</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>run</goal>
|
|
|
|
</goals>
|
|
|
|
<id>ant-get-systeminfo</id>
|
|
|
|
<configuration>
|
|
|
|
<exportAntProperties>true</exportAntProperties>
|
|
|
|
<tasks>
|
|
|
|
<exec executable="sh" outputproperty="ldd_version">
|
2015-03-03 08:05:52 +01:00
|
|
|
<arg value="-c" />
|
|
|
|
<arg value="ldd --version | head -1" />
|
2014-09-12 21:30:50 +02:00
|
|
|
</exec>
|
|
|
|
<exec executable="uname" outputproperty="uname_os_version">
|
2015-03-03 08:05:52 +01:00
|
|
|
<arg value="-r" />
|
2014-09-12 21:30:50 +02:00
|
|
|
</exec>
|
|
|
|
</tasks>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
<plugin>
|
|
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
|
|
<artifactId>build-helper-maven-plugin</artifactId>
|
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<!-- Phase must be before regex-combined-sendmmsg -->
|
|
|
|
<phase>initialize</phase>
|
|
|
|
<id>regex-glibc-sendmmsg</id>
|
|
|
|
<goals>
|
|
|
|
<goal>regex-property</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<name>glibc.sendmmsg.support</name>
|
|
|
|
<value>${ldd_version}</value>
|
|
|
|
<!-- Version must be >= 2.14 - set to IO_NETTY_SENDMSSG_NOT_FOUND if this version is not satisfied -->
|
|
|
|
<regex>^((?!^[^)]+\)\s+(0*2\.1[4-9]|0*2\.[2-9][0-9]+|0*[3-9][0-9]*|0*[1-9]+[0-9]+).*).)*$</regex>
|
|
|
|
<replacement>IO_NETTY_SENDMSSG_NOT_FOUND</replacement>
|
|
|
|
<failIfNoMatch>false</failIfNoMatch>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
<execution>
|
|
|
|
<!-- Phase must be before regex-combined-sendmmsg -->
|
|
|
|
<phase>initialize</phase>
|
|
|
|
<id>regex-linux-sendmmsg</id>
|
|
|
|
<goals>
|
|
|
|
<goal>regex-property</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<name>linux.sendmmsg.support</name>
|
|
|
|
<value>${uname_os_version}</value>
|
|
|
|
<!-- Version must be >= 3 - set to IO_NETTY_SENDMSSG_NOT_FOUND if this version is not satisfied -->
|
|
|
|
<regex>^((?!^[0-9]*[3-9]\.?.*).)*$</regex>
|
|
|
|
<replacement>IO_NETTY_SENDMSSG_NOT_FOUND</replacement>
|
|
|
|
<failIfNoMatch>false</failIfNoMatch>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
<execution>
|
|
|
|
<!-- Phase must be before regex-unset-if-needed-sendmmsg -->
|
|
|
|
<phase>generate-sources</phase>
|
|
|
|
<id>regex-combined-sendmmsg</id>
|
|
|
|
<goals>
|
|
|
|
<goal>regex-property</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
2016-06-06 23:51:05 +02:00
|
|
|
<name>jni.compiler.args.cflags</name>
|
2014-09-12 21:30:50 +02:00
|
|
|
<value>${linux.sendmmsg.support}${glibc.sendmmsg.support}</value>
|
|
|
|
<!-- If glibc and linux kernel are both not sufficient...then define the CFLAGS -->
|
|
|
|
<regex>.*IO_NETTY_SENDMSSG_NOT_FOUND.*</regex>
|
2016-12-12 14:26:33 +01:00
|
|
|
<replacement>CFLAGS=-O3 -DIO_NETTY_SENDMMSG_NOT_FOUND -Werror -fno-omit-frame-pointer -Wunused-variable</replacement>
|
2014-09-12 21:30:50 +02:00
|
|
|
<failIfNoMatch>false</failIfNoMatch>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
<execution>
|
|
|
|
<!-- Phase must be before build-native-lib -->
|
|
|
|
<phase>generate-sources</phase>
|
|
|
|
<id>regex-unset-if-needed-sendmmsg</id>
|
|
|
|
<goals>
|
|
|
|
<goal>regex-property</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
2016-06-06 23:51:05 +02:00
|
|
|
<name>jni.compiler.args.cflags</name>
|
|
|
|
<value>${jni.compiler.args.cflags}</value>
|
2014-09-12 21:30:50 +02:00
|
|
|
<!-- If glibc and linux kernel are both not sufficient...then define the CFLAGS -->
|
|
|
|
<regex>^((?!CFLAGS=).)*$</regex>
|
2016-12-12 14:26:33 +01:00
|
|
|
<replacement>CFLAGS=-O3 -Werror -fno-omit-frame-pointer -Wunused-variable</replacement>
|
2014-09-12 21:30:50 +02:00
|
|
|
<failIfNoMatch>false</failIfNoMatch>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
2014-02-15 22:26:36 +01:00
|
|
|
</plugins>
|
|
|
|
</build>
|
|
|
|
</project>
|
2014-05-01 12:26:51 +02:00
|
|
|
|