2018-07-11 21:03:59 +02:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!--
|
|
|
|
~ Copyright 2018 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>
|
2019-07-24 11:05:57 +02:00
|
|
|
<version>4.1.39.Final-SNAPSHOT</version>
|
2018-07-11 21:03:59 +02:00
|
|
|
</parent>
|
|
|
|
|
|
|
|
<artifactId>netty-testsuite-shading</artifactId>
|
|
|
|
<packaging>jar</packaging>
|
|
|
|
|
|
|
|
<name>Netty/Testsuite/Shading</name>
|
|
|
|
|
|
|
|
<properties>
|
|
|
|
<generatedSourceDir>${project.build.directory}/src</generatedSourceDir>
|
|
|
|
<dependencyVersionsDir>${project.build.directory}/versions</dependencyVersionsDir>
|
|
|
|
<classesShadedDir>${project.build.directory}/classes-shaded</classesShadedDir>
|
|
|
|
<classesShadedNativeDir>${classesShadedDir}/META-INF/native</classesShadedNativeDir>
|
|
|
|
<shadingPrefix>shaded</shadingPrefix>
|
2018-08-21 07:53:45 +02:00
|
|
|
<shadingPrefix2>shaded2</shadingPrefix2>
|
|
|
|
|
2018-07-11 21:03:59 +02:00
|
|
|
<jarName>${project.artifactId}-${project.version}.jar</jarName>
|
|
|
|
<shadedPackagePrefix>io.netty.</shadedPackagePrefix>
|
2019-03-01 19:42:29 +01:00
|
|
|
<skipJapicmp>true</skipJapicmp>
|
2018-07-11 21:03:59 +02:00
|
|
|
</properties>
|
|
|
|
|
|
|
|
<build>
|
|
|
|
<extensions>
|
|
|
|
<extension>
|
|
|
|
<groupId>kr.motd.maven</groupId>
|
|
|
|
<artifactId>os-maven-plugin</artifactId>
|
|
|
|
<version>1.6.0</version>
|
|
|
|
</extension>
|
|
|
|
</extensions>
|
|
|
|
<plugins>
|
|
|
|
<!-- Do not deploy this module -->
|
|
|
|
<plugin>
|
|
|
|
<artifactId>maven-deploy-plugin</artifactId>
|
|
|
|
<configuration>
|
|
|
|
<skip>true</skip>
|
|
|
|
</configuration>
|
|
|
|
</plugin>
|
|
|
|
</plugins>
|
|
|
|
</build>
|
|
|
|
<dependencies>
|
|
|
|
<dependency>
|
|
|
|
<groupId>junit</groupId>
|
|
|
|
<artifactId>junit</artifactId>
|
|
|
|
</dependency>
|
|
|
|
</dependencies>
|
|
|
|
<profiles>
|
2018-11-12 20:59:44 +01:00
|
|
|
<profile>
|
|
|
|
<id>windows</id>
|
|
|
|
<activation>
|
|
|
|
<os>
|
|
|
|
<family>windows</family>
|
|
|
|
</os>
|
|
|
|
</activation>
|
|
|
|
<dependencies>
|
|
|
|
<dependency>
|
|
|
|
<groupId>${project.groupId}</groupId>
|
|
|
|
<artifactId>netty-common</artifactId>
|
|
|
|
<version>${project.version}</version>
|
|
|
|
<scope>compile</scope>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>${project.groupId}</groupId>
|
|
|
|
<artifactId>netty-handler</artifactId>
|
|
|
|
<version>${project.version}</version>
|
|
|
|
<scope>compile</scope>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>${project.groupId}</groupId>
|
|
|
|
<artifactId>${tcnative.artifactId}</artifactId>
|
|
|
|
<version>${tcnative.version}</version>
|
|
|
|
<classifier>${tcnative.classifier}</classifier>
|
|
|
|
<scope>compile</scope>
|
|
|
|
</dependency>
|
|
|
|
</dependencies>
|
|
|
|
</profile>
|
2018-07-11 21:03:59 +02:00
|
|
|
<profile>
|
|
|
|
<id>mac</id>
|
|
|
|
<activation>
|
|
|
|
<os>
|
|
|
|
<family>mac</family>
|
|
|
|
</os>
|
|
|
|
</activation>
|
|
|
|
<properties>
|
2018-07-27 20:53:43 +02:00
|
|
|
<nativeTransportLib>netty_transport_native_kqueue_${os.detected.arch}.jnilib</nativeTransportLib>
|
2018-07-11 21:03:59 +02:00
|
|
|
</properties>
|
|
|
|
<dependencies>
|
2018-11-12 20:59:44 +01:00
|
|
|
<dependency>
|
|
|
|
<groupId>${project.groupId}</groupId>
|
|
|
|
<artifactId>netty-common</artifactId>
|
|
|
|
<version>${project.version}</version>
|
|
|
|
<scope>compile</scope>
|
|
|
|
</dependency>
|
2018-07-11 21:03:59 +02:00
|
|
|
<dependency>
|
|
|
|
<groupId>${project.groupId}</groupId>
|
|
|
|
<artifactId>netty-transport-native-kqueue</artifactId>
|
|
|
|
<version>${project.version}</version>
|
|
|
|
<classifier>${jni.classifier}</classifier>
|
|
|
|
<scope>compile</scope>
|
|
|
|
</dependency>
|
2018-07-27 20:53:43 +02:00
|
|
|
<!-- Needed to test shading of netty-tcnative -->
|
|
|
|
<dependency>
|
|
|
|
<groupId>${project.groupId}</groupId>
|
|
|
|
<artifactId>netty-handler</artifactId>
|
|
|
|
<version>${project.version}</version>
|
|
|
|
<scope>compile</scope>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>${project.groupId}</groupId>
|
|
|
|
<artifactId>${tcnative.artifactId}</artifactId>
|
|
|
|
<version>${tcnative.version}</version>
|
|
|
|
<classifier>${tcnative.classifier}</classifier>
|
|
|
|
<scope>compile</scope>
|
|
|
|
</dependency>
|
2018-07-11 21:03:59 +02:00
|
|
|
</dependencies>
|
|
|
|
|
|
|
|
<build>
|
|
|
|
<plugins>
|
|
|
|
<plugin>
|
|
|
|
<artifactId>maven-shade-plugin</artifactId>
|
|
|
|
<executions>
|
|
|
|
<execution>
|
2018-08-21 07:53:45 +02:00
|
|
|
<id>shade</id>
|
2018-07-11 21:03:59 +02:00
|
|
|
<phase>package</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>shade</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<artifactSet>
|
|
|
|
<includes>
|
|
|
|
<include>${project.groupId}</include>
|
|
|
|
</includes>
|
|
|
|
</artifactSet>
|
|
|
|
<relocations>
|
|
|
|
<relocation>
|
|
|
|
<pattern>${shadedPackagePrefix}</pattern>
|
|
|
|
<shadedPattern>${shadingPrefix}.${shadedPackagePrefix}</shadedPattern>
|
|
|
|
</relocation>
|
|
|
|
</relocations>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
2018-08-21 07:53:45 +02:00
|
|
|
<execution>
|
|
|
|
<id>shade-1</id>
|
|
|
|
<phase>package</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>shade</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<artifactSet>
|
|
|
|
<includes>
|
|
|
|
<include>${project.groupId}</include>
|
|
|
|
</includes>
|
|
|
|
</artifactSet>
|
|
|
|
<relocations>
|
|
|
|
<relocation>
|
|
|
|
<pattern>${shadedPackagePrefix}</pattern>
|
|
|
|
<shadedPattern>${shadingPrefix2}.${shadedPackagePrefix}</shadedPattern>
|
|
|
|
</relocation>
|
|
|
|
</relocations>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
2018-07-11 21:03:59 +02:00
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
<plugin>
|
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
|
<artifactId>maven-antrun-plugin</artifactId>
|
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<id>unpack-jar-features</id>
|
|
|
|
<phase>package</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>run</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<target>
|
|
|
|
<unzip dest="${classesShadedDir}/">
|
|
|
|
<fileset dir="${project.build.directory}/">
|
|
|
|
<include name="${jarName}" />
|
|
|
|
</fileset>
|
|
|
|
</unzip>
|
2018-08-21 07:53:45 +02:00
|
|
|
<copy file="${classesShadedNativeDir}/lib${nativeTransportLib}" tofile="${classesShadedNativeDir}/lib${shadingPrefix}_${nativeTransportLib}" />
|
|
|
|
<copy file="${classesShadedNativeDir}/lib${nativeTransportLib}" tofile="${classesShadedNativeDir}/lib${shadingPrefix2}_${nativeTransportLib}" />
|
|
|
|
<delete file="${classesShadedNativeDir}/lib${nativeTransportLib}" />
|
|
|
|
|
2018-10-18 17:33:21 +02:00
|
|
|
<condition property="nativeTcnativeLib" value="netty_tcnative_osx_${os.detected.arch}.jnilib" else="netty_tcnative.jnilib">
|
|
|
|
<equals arg1="${tcnative.classifier}" arg2="" />
|
|
|
|
</condition>
|
|
|
|
|
2018-08-21 07:53:45 +02:00
|
|
|
<copy file="${classesShadedNativeDir}/lib${nativeTcnativeLib}" tofile="${classesShadedNativeDir}/lib${shadingPrefix}_${nativeTcnativeLib}" />
|
|
|
|
<copy file="${classesShadedNativeDir}/lib${nativeTcnativeLib}" tofile="${classesShadedNativeDir}/lib${shadingPrefix2}_${nativeTcnativeLib}" />
|
|
|
|
<delete file="${classesShadedNativeDir}/lib${nativeTcnativeLib}" />
|
|
|
|
|
2018-07-27 06:59:06 +02:00
|
|
|
<jar destfile="${project.build.directory}/${jarName}" basedir="${classesShadedDir}" />
|
|
|
|
<delete dir="${classesShadedDir}" />
|
2018-07-11 21:03:59 +02:00
|
|
|
</target>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
<plugin>
|
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
|
<artifactId>maven-failsafe-plugin</artifactId>
|
|
|
|
<configuration>
|
|
|
|
<systemPropertyVariables>
|
|
|
|
<shadingPrefix>${shadingPrefix}</shadingPrefix>
|
2018-08-21 07:53:45 +02:00
|
|
|
<shadingPrefix2>${shadingPrefix2}</shadingPrefix2>
|
2018-07-11 21:03:59 +02:00
|
|
|
</systemPropertyVariables>
|
|
|
|
</configuration>
|
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<phase>package</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>integration-test</goal>
|
|
|
|
</goals>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
</plugins>
|
|
|
|
</build>
|
|
|
|
</profile>
|
|
|
|
<profile>
|
|
|
|
<id>linux</id>
|
|
|
|
<activation>
|
|
|
|
<os>
|
|
|
|
<family>linux</family>
|
|
|
|
</os>
|
|
|
|
</activation>
|
|
|
|
<properties>
|
2018-07-27 20:53:43 +02:00
|
|
|
<nativeTransportLib>netty_transport_native_epoll_${os.detected.arch}.so</nativeTransportLib>
|
2018-07-11 21:03:59 +02:00
|
|
|
</properties>
|
|
|
|
<dependencies>
|
2018-11-12 20:59:44 +01:00
|
|
|
<dependency>
|
|
|
|
<groupId>${project.groupId}</groupId>
|
|
|
|
<artifactId>netty-common</artifactId>
|
|
|
|
<version>${project.version}</version>
|
|
|
|
<scope>compile</scope>
|
|
|
|
</dependency>
|
2018-07-11 21:03:59 +02:00
|
|
|
<dependency>
|
|
|
|
<groupId>${project.groupId}</groupId>
|
|
|
|
<artifactId>netty-transport-native-epoll</artifactId>
|
|
|
|
<version>${project.version}</version>
|
|
|
|
<classifier>${jni.classifier}</classifier>
|
|
|
|
<scope>compile</scope>
|
|
|
|
</dependency>
|
2018-07-27 20:53:43 +02:00
|
|
|
<!-- Needed to test shading of netty-tcnative -->
|
|
|
|
<dependency>
|
|
|
|
<groupId>${project.groupId}</groupId>
|
|
|
|
<artifactId>netty-handler</artifactId>
|
|
|
|
<version>${project.version}</version>
|
|
|
|
<scope>compile</scope>
|
|
|
|
</dependency>
|
|
|
|
<dependency>
|
|
|
|
<groupId>${project.groupId}</groupId>
|
|
|
|
<artifactId>${tcnative.artifactId}</artifactId>
|
|
|
|
<version>${tcnative.version}</version>
|
|
|
|
<classifier>${tcnative.classifier}</classifier>
|
|
|
|
<scope>compile</scope>
|
|
|
|
</dependency>
|
2018-07-11 21:03:59 +02:00
|
|
|
</dependencies>
|
|
|
|
|
|
|
|
<build>
|
|
|
|
<plugins>
|
|
|
|
<plugin>
|
|
|
|
<artifactId>maven-shade-plugin</artifactId>
|
|
|
|
<executions>
|
|
|
|
<execution>
|
2018-08-21 07:53:45 +02:00
|
|
|
<id>shade</id>
|
2018-07-11 21:03:59 +02:00
|
|
|
<phase>package</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>shade</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<artifactSet>
|
|
|
|
<includes>
|
|
|
|
<include>${project.groupId}</include>
|
|
|
|
</includes>
|
|
|
|
</artifactSet>
|
|
|
|
<relocations>
|
|
|
|
<relocation>
|
|
|
|
<pattern>${shadedPackagePrefix}</pattern>
|
|
|
|
<shadedPattern>${shadingPrefix}.${shadedPackagePrefix}</shadedPattern>
|
|
|
|
</relocation>
|
|
|
|
</relocations>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
2018-08-21 07:53:45 +02:00
|
|
|
<execution>
|
|
|
|
<id>shade-1</id>
|
|
|
|
<phase>package</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>shade</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<artifactSet>
|
|
|
|
<includes>
|
|
|
|
<include>${project.groupId}</include>
|
|
|
|
</includes>
|
|
|
|
</artifactSet>
|
|
|
|
<relocations>
|
|
|
|
<relocation>
|
|
|
|
<pattern>${shadedPackagePrefix}</pattern>
|
|
|
|
<shadedPattern>${shadingPrefix2}.${shadedPackagePrefix}</shadedPattern>
|
|
|
|
</relocation>
|
|
|
|
</relocations>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
2018-07-11 21:03:59 +02:00
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
<plugin>
|
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
|
<artifactId>maven-antrun-plugin</artifactId>
|
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<id>unpack-jar-features</id>
|
|
|
|
<phase>package</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>run</goal>
|
|
|
|
</goals>
|
|
|
|
<configuration>
|
|
|
|
<target>
|
|
|
|
<unzip dest="${classesShadedDir}/">
|
|
|
|
<fileset dir="${project.build.directory}/">
|
|
|
|
<include name="${jarName}" />
|
|
|
|
</fileset>
|
|
|
|
</unzip>
|
2018-08-21 07:53:45 +02:00
|
|
|
<copy file="${classesShadedNativeDir}/lib${nativeTransportLib}" tofile="${classesShadedNativeDir}/lib${shadingPrefix}_${nativeTransportLib}" />
|
|
|
|
<copy file="${classesShadedNativeDir}/lib${nativeTransportLib}" tofile="${classesShadedNativeDir}/lib${shadingPrefix2}_${nativeTransportLib}" />
|
|
|
|
<delete file="${classesShadedNativeDir}/lib${nativeTransportLib}" />
|
|
|
|
|
2018-10-18 17:33:21 +02:00
|
|
|
<condition property="nativeTcnativeLib" value="netty_tcnative_linux_${os.detected.arch}.so" else="netty_tcnative.so">
|
|
|
|
<equals arg1="${tcnative.classifier}" arg2="" />
|
|
|
|
</condition>
|
|
|
|
|
2018-08-21 07:53:45 +02:00
|
|
|
<copy file="${classesShadedNativeDir}/lib${nativeTcnativeLib}" tofile="${classesShadedNativeDir}/lib${shadingPrefix}_${nativeTcnativeLib}" />
|
|
|
|
<copy file="${classesShadedNativeDir}/lib${nativeTcnativeLib}" tofile="${classesShadedNativeDir}/lib${shadingPrefix2}_${nativeTcnativeLib}" />
|
|
|
|
<delete file="${classesShadedNativeDir}/lib${nativeTcnativeLib}" />
|
|
|
|
|
2018-07-27 06:59:06 +02:00
|
|
|
<jar destfile="${project.build.directory}/${jarName}" basedir="${classesShadedDir}" />
|
|
|
|
<delete dir="${classesShadedDir}" />
|
2018-07-11 21:03:59 +02:00
|
|
|
</target>
|
|
|
|
</configuration>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
<plugin>
|
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
|
<artifactId>maven-failsafe-plugin</artifactId>
|
|
|
|
<configuration>
|
|
|
|
<systemPropertyVariables>
|
|
|
|
<shadingPrefix>${shadingPrefix}</shadingPrefix>
|
2018-08-21 07:53:45 +02:00
|
|
|
<shadingPrefix2>${shadingPrefix2}</shadingPrefix2>
|
2018-07-11 21:03:59 +02:00
|
|
|
</systemPropertyVariables>
|
|
|
|
</configuration>
|
|
|
|
<executions>
|
|
|
|
<execution>
|
|
|
|
<phase>package</phase>
|
|
|
|
<goals>
|
|
|
|
<goal>integration-test</goal>
|
|
|
|
</goals>
|
|
|
|
</execution>
|
|
|
|
</executions>
|
|
|
|
</plugin>
|
|
|
|
</plugins>
|
|
|
|
</build>
|
|
|
|
</profile>
|
|
|
|
</profiles>
|
|
|
|
</project>
|
|
|
|
|