| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
<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"> |
| 18 |
<modelVersion>4.0.0</modelVersion> |
| 19 |
<parent> |
| 20 |
<groupId>io.netty</groupId> |
| 21 |
<artifactId>netty-parent</artifactId> |
| 22 |
<version>4.1.48.Final</version> |
| 23 |
</parent> |
| 24 |
<artifactId>netty-transport-native-unix-common</artifactId> |
| 25 |
|
| 26 |
<name>Netty/Transport/Native/Unix/Common</name> |
| 27 |
<packaging>jar</packaging> |
| 28 |
<description> |
| 29 |
Static library which contains common unix utilities. |
| 30 |
</description> |
| 31 |
|
| 32 |
<properties> |
| 33 |
<javaModuleName>io.netty.transport.unix.common</javaModuleName> |
| 34 |
|
| 35 |
<exe.make>make</exe.make> |
| 36 |
<exe.compiler>gcc</exe.compiler> |
| 37 |
<exe.archiver>ar</exe.archiver> |
| 38 |
<nativeLibName>libnetty-unix-common</nativeLibName> |
| 39 |
<nativeIncludeDir>${project.basedir}/src/main/c</nativeIncludeDir> |
| 40 |
<nativeJarWorkdir>${project.build.directory}/native-jar-work</nativeJarWorkdir> |
| 41 |
<nativeObjsOnlyDir>${project.build.directory}/native-objs-only</nativeObjsOnlyDir> |
| 42 |
<nativeLibOnlyDir>${project.build.directory}/native-lib-only</nativeLibOnlyDir> |
| 43 |
<defaultJarFile>${project.build.directory}/${project.build.finalName}.jar</defaultJarFile> |
| 44 |
<nativeJarFile>${project.build.directory}/${project.build.finalName}-${jni.classifier}.jar</nativeJarFile> |
| 45 |
</properties> |
| 46 |
|
| 47 |
<build> |
| 48 |
<plugins> |
| 49 |
|
| 50 |
<plugin> |
| 51 |
<groupId>org.codehaus.mojo</groupId> |
| 52 |
<artifactId>build-helper-maven-plugin</artifactId> |
| 53 |
<executions> |
| 54 |
<execution> |
| 55 |
<phase>generate-sources</phase> |
| 56 |
<goals> |
| 57 |
<goal>add-source</goal> |
| 58 |
</goals> |
| 59 |
<configuration> |
| 60 |
<sources> |
| 61 |
<source>${nativeIncludeDir}</source> |
| 62 |
</sources> |
| 63 |
</configuration> |
| 64 |
</execution> |
| 65 |
</executions> |
| 66 |
</plugin> |
| 67 |
</plugins> |
| 68 |
</build> |
| 69 |
|
| 70 |
<profiles> |
| 71 |
<profile> |
| 72 |
<id>mac</id> |
| 73 |
<activation> |
| 74 |
<os> |
| 75 |
<family>mac</family> |
| 76 |
</os> |
| 77 |
</activation> |
| 78 |
<properties> |
| 79 |
<exe.compiler>clang</exe.compiler> |
| 80 |
<jni.platform>darwin</jni.platform> |
| 81 |
</properties> |
| 82 |
<build> |
| 83 |
<plugins> |
| 84 |
<plugin> |
| 85 |
<artifactId>maven-antrun-plugin</artifactId> |
| 86 |
<executions> |
| 87 |
|
| 88 |
<execution> |
| 89 |
<id>native-jar</id> |
| 90 |
<phase>package</phase> |
| 91 |
<goals> |
| 92 |
<goal>run</goal> |
| 93 |
</goals> |
| 94 |
<configuration> |
| 95 |
<target> |
| 96 |
<copy todir="${nativeJarWorkdir}"> |
| 97 |
<zipfileset src="${defaultJarFile}" /> |
| 98 |
</copy> |
| 99 |
<copy todir="${nativeJarWorkdir}" includeEmptyDirs="false"> |
| 100 |
<zipfileset dir="${nativeLibOnlyDir}" /> |
| 101 |
<regexpmapper handledirsep="yes" from="^(?:[^/]+/)*([^/]+)$" to="META-INF/native/lib/\1" /> |
| 102 |
</copy> |
| 103 |
<copy todir="${nativeJarWorkdir}" includeEmptyDirs="false"> |
| 104 |
<zipfileset dir="${nativeIncludeDir}" /> |
| 105 |
<regexpmapper handledirsep="yes" from="^(?:[^/]+/)*([^/]+).h$" to="META-INF/native/include/\1.h" /> |
| 106 |
</copy> |
| 107 |
<jar destfile="${nativeJarFile}" manifest="${nativeJarWorkdir}/META-INF/MANIFEST.MF" basedir="${nativeJarWorkdir}" index="true" excludes="META-INF/MANIFEST.MF,META-INF/INDEX.LIST" /> |
| 108 |
<attachartifact file="${nativeJarFile}" classifier="${jni.classifier}" type="jar" /> |
| 109 |
</target> |
| 110 |
</configuration> |
| 111 |
</execution> |
| 112 |
|
| 113 |
<execution> |
| 114 |
<id>build-native-lib</id> |
| 115 |
<phase>generate-sources</phase> |
| 116 |
<goals> |
| 117 |
<goal>run</goal> |
| 118 |
</goals> |
| 119 |
<configuration> |
| 120 |
<target> |
| 121 |
<exec executable="${exe.make}" failonerror="true" resolveexecutable="true"> |
| 122 |
<env key="CC" value="${exe.compiler}" /> |
| 123 |
<env key="AR" value="${exe.archiver}" /> |
| 124 |
<env key="LIB_DIR" value="${nativeLibOnlyDir}" /> |
| 125 |
<env key="OBJ_DIR" value="${nativeObjsOnlyDir}" /> |
| 126 |
<env key="JNI_PLATFORM" value="${jni.platform}" /> |
| •127 |
<env key="CFLAGS" value="-O3 -Wno-attributes -fPIC -fno-omit-frame-pointer -Wunused-variable -fvisibility=hidden" /> |
| 128 |
<env key="LDFLAGS" value="-Wl,--no-as-needed -lrt" /> |
| 129 |
<env key="LIB_NAME" value="${nativeLibName}" /> |
| 130 |
|
| 131 |
|
| 132 |
|
| 133 |
<env key="MACOSX_DEPLOYMENT_TARGET" value="10.2" /> |
| 134 |
</exec> |
| 135 |
</target> |
| 136 |
</configuration> |
| 137 |
</execution> |
| 138 |
</executions> |
| 139 |
</plugin> |
| 140 |
</plugins> |
| 141 |
</build> |
| 142 |
</profile> |
| 143 |
<profile> |
| 144 |
<id>linux</id> |
| 145 |
<activation> |
| 146 |
<os> |
| 147 |
<family>linux</family> |
| 148 |
</os> |
| 149 |
</activation> |
| 150 |
<properties> |
| 151 |
<jni.platform>linux</jni.platform> |
| 152 |
</properties> |
| 153 |
<build> |
| 154 |
<plugins> |
| 155 |
<plugin> |
| 156 |
<artifactId>maven-antrun-plugin</artifactId> |
| 157 |
<executions> |
| 158 |
|
| 159 |
<execution> |
| 160 |
<id>native-jar</id> |
| 161 |
<phase>package</phase> |
| 162 |
<goals> |
| 163 |
<goal>run</goal> |
| 164 |
</goals> |
| 165 |
<configuration> |
| 166 |
<target> |
| 167 |
<copy todir="${nativeJarWorkdir}"> |
| 168 |
<zipfileset src="${defaultJarFile}" /> |
| 169 |
</copy> |
| 170 |
<copy todir="${nativeJarWorkdir}" includeEmptyDirs="false"> |
| 171 |
<zipfileset dir="${nativeLibOnlyDir}" /> |
| 172 |
<regexpmapper handledirsep="yes" from="^(?:[^/]+/)*([^/]+)$" to="META-INF/native/lib/\1" /> |
| 173 |
</copy> |
| 174 |
<copy todir="${nativeJarWorkdir}" includeEmptyDirs="false"> |
| 175 |
<zipfileset dir="${nativeIncludeDir}" /> |
| 176 |
<regexpmapper handledirsep="yes" from="^(?:[^/]+/)*([^/]+).h$" to="META-INF/native/include/\1.h" /> |
| 177 |
</copy> |
| 178 |
<jar destfile="${nativeJarFile}" manifest="${nativeJarWorkdir}/META-INF/MANIFEST.MF" basedir="${nativeJarWorkdir}" index="true" excludes="META-INF/MANIFEST.MF,META-INF/INDEX.LIST" /> |
| 179 |
<attachartifact file="${nativeJarFile}" classifier="${jni.classifier}" type="jar" /> |
| 180 |
</target> |
| 181 |
</configuration> |
| 182 |
</execution> |
| 183 |
|
| 184 |
<execution> |
| 185 |
<id>build-native-lib</id> |
| 186 |
<phase>generate-sources</phase> |
| 187 |
<goals> |
| 188 |
<goal>run</goal> |
| 189 |
</goals> |
| 190 |
<configuration> |
| 191 |
<target> |
| 192 |
<exec executable="${exe.make}" failonerror="true" resolveexecutable="true"> |
| 193 |
<env key="CC" value="${exe.compiler}" /> |
| 194 |
<env key="AR" value="${exe.archiver}" /> |
| 195 |
<env key="LIB_DIR" value="${nativeLibOnlyDir}" /> |
| 196 |
<env key="OBJ_DIR" value="${nativeObjsOnlyDir}" /> |
| 197 |
<env key="JNI_PLATFORM" value="${jni.platform}" /> |
| •198 |
<env key="CFLAGS" value="-O3 -Wno-attributes -fPIC -fno-omit-frame-pointer -Wunused-variable -fvisibility=hidden" /> |
| 199 |
<env key="LDFLAGS" value="-Wl,--no-as-needed -lrt" /> |
| 200 |
<env key="LIB_NAME" value="${nativeLibName}" /> |
| 201 |
</exec> |
| 202 |
</target> |
| 203 |
</configuration> |
| 204 |
</execution> |
| 205 |
</executions> |
| 206 |
</plugin> |
| 207 |
</plugins> |
| 208 |
</build> |
| 209 |
</profile> |
| 210 |
<profile> |
| 211 |
<id>freebsd</id> |
| 212 |
<activation> |
| 213 |
<os> |
| 214 |
<family>unix</family> |
| 215 |
<name>freebsd</name> |
| 216 |
</os> |
| 217 |
</activation> |
| 218 |
<properties> |
| 219 |
<exe.compiler>clang</exe.compiler> |
| 220 |
<exe.make>gmake</exe.make> |
| 221 |
<jni.platform>freebsd</jni.platform> |
| 222 |
</properties> |
| 223 |
<build> |
| 224 |
<plugins> |
| 225 |
<plugin> |
| 226 |
<artifactId>maven-antrun-plugin</artifactId> |
| 227 |
<executions> |
| 228 |
|
| 229 |
<execution> |
| 230 |
<id>native-jar</id> |
| 231 |
<phase>package</phase> |
| 232 |
<goals> |
| 233 |
<goal>run</goal> |
| 234 |
</goals> |
| 235 |
<configuration> |
| 236 |
<target> |
| 237 |
<copy todir="${nativeJarWorkdir}"> |
| 238 |
<zipfileset src="${defaultJarFile}" /> |
| 239 |
</copy> |
| 240 |
<copy todir="${nativeJarWorkdir}" includeEmptyDirs="false"> |
| 241 |
<zipfileset dir="${nativeLibOnlyDir}" /> |
| 242 |
<regexpmapper handledirsep="yes" from="^(?:[^/]+/)*([^/]+)$" to="META-INF/native/lib/\1" /> |
| 243 |
</copy> |
| 244 |
<copy todir="${nativeJarWorkdir}" includeEmptyDirs="false"> |
| 245 |
<zipfileset dir="${nativeIncludeDir}" /> |
| 246 |
<regexpmapper handledirsep="yes" from="^(?:[^/]+/)*([^/]+).h$" to="META-INF/native/include/\1.h" /> |
| 247 |
</copy> |
| 248 |
<jar destfile="${nativeJarFile}" manifest="${nativeJarWorkdir}/META-INF/MANIFEST.MF" basedir="${nativeJarWorkdir}" index="true" excludes="META-INF/MANIFEST.MF,META-INF/INDEX.LIST" /> |
| 249 |
<attachartifact file="${nativeJarFile}" classifier="${jni.classifier}" type="jar" /> |
| 250 |
</target> |
| 251 |
</configuration> |
| 252 |
</execution> |
| 253 |
|
| 254 |
<execution> |
| 255 |
<id>build-native-lib</id> |
| 256 |
<phase>generate-sources</phase> |
| 257 |
<goals> |
| 258 |
<goal>run</goal> |
| 259 |
</goals> |
| 260 |
<configuration> |
| 261 |
<target> |
| 262 |
<exec executable="${exe.make}" failonerror="true" resolveexecutable="true"> |
| 263 |
<env key="CC" value="${exe.compiler}" /> |
| 264 |
<env key="AR" value="${exe.archiver}" /> |
| 265 |
<env key="LIB_DIR" value="${nativeLibOnlyDir}" /> |
| 266 |
<env key="OBJ_DIR" value="${nativeObjsOnlyDir}" /> |
| 267 |
<env key="JNI_PLATFORM" value="${jni.platform}" /> |
| •268 |
<env key="CFLAGS" value="-O3 -Wno-attributes -fPIC -fno-omit-frame-pointer -Wunused-variable -fvisibility=hidden" /> |
| 269 |
<env key="LDFLAGS" value="-Wl,--no-as-needed -lrt" /> |
| 270 |
<env key="LIB_NAME" value="${nativeLibName}" /> |
| 271 |
</exec> |
| 272 |
</target> |
| 273 |
</configuration> |
| 274 |
</execution> |
| 275 |
</executions> |
| 276 |
</plugin> |
| 277 |
</plugins> |
| 278 |
</build> |
| 279 |
</profile> |
| 280 |
<profile> |
| 281 |
<id>openbsd</id> |
| 282 |
<activation> |
| 283 |
<os> |
| 284 |
<family>unix</family> |
| 285 |
<name>openbsd</name> |
| 286 |
</os> |
| 287 |
</activation> |
| 288 |
<properties> |
| 289 |
<exe.compiler>clang</exe.compiler> |
| 290 |
<exe.make>gmake</exe.make> |
| 291 |
<jni.platform>openbsd</jni.platform> |
| 292 |
</properties> |
| 293 |
<build> |
| 294 |
<plugins> |
| 295 |
<plugin> |
| 296 |
<artifactId>maven-antrun-plugin</artifactId> |
| 297 |
<executions> |
| 298 |
|
| 299 |
<execution> |
| 300 |
<id>native-jar</id> |
| 301 |
<phase>package</phase> |
| 302 |
<goals> |
| 303 |
<goal>run</goal> |
| 304 |
</goals> |
| 305 |
<configuration> |
| 306 |
<target> |
| 307 |
<copy todir="${nativeJarWorkdir}"> |
| 308 |
<zipfileset src="${defaultJarFile}" /> |
| 309 |
</copy> |
| 310 |
<copy todir="${nativeJarWorkdir}" includeEmptyDirs="false"> |
| 311 |
<zipfileset dir="${nativeLibOnlyDir}" /> |
| 312 |
<regexpmapper handledirsep="yes" from="^(?:[^/]+/)*([^/]+)$" to="META-INF/native/lib/\1" /> |
| 313 |
</copy> |
| 314 |
<copy todir="${nativeJarWorkdir}" includeEmptyDirs="false"> |
| 315 |
<zipfileset dir="${nativeIncludeDir}" /> |
| 316 |
<regexpmapper handledirsep="yes" from="^(?:[^/]+/)*([^/]+).h$" to="META-INF/native/include/\1.h" /> |
| 317 |
</copy> |
| 318 |
<jar destfile="${nativeJarFile}" manifest="${nativeJarWorkdir}/META-INF/MANIFEST.MF" basedir="${nativeJarWorkdir}" index="true" excludes="META-INF/MANIFEST.MF,META-INF/INDEX.LIST" /> |
| 319 |
<attachartifact file="${nativeJarFile}" classifier="${jni.classifier}" type="jar" /> |
| 320 |
</target> |
| 321 |
</configuration> |
| 322 |
</execution> |
| 323 |
|
| 324 |
<execution> |
| 325 |
<id>build-native-lib</id> |
| 326 |
<phase>generate-sources</phase> |
| 327 |
<goals> |
| 328 |
<goal>run</goal> |
| 329 |
</goals> |
| 330 |
<configuration> |
| 331 |
<target> |
| 332 |
<exec executable="${exe.make}" failonerror="true" resolveexecutable="true"> |
| 333 |
<env key="CC" value="${exe.compiler}" /> |
| 334 |
<env key="AR" value="${exe.archiver}" /> |
| 335 |
<env key="LIB_DIR" value="${nativeLibOnlyDir}" /> |
| 336 |
<env key="OBJ_DIR" value="${nativeObjsOnlyDir}" /> |
| 337 |
<env key="JNI_PLATFORM" value="${jni.platform}" /> |
| •338 |
<env key="CFLAGS" value="-O3 -Wno-attributes -fPIC -fno-omit-frame-pointer -Wunused-variable -fvisibility=hidden" /> |
| 339 |
<env key="LDFLAGS" value="-Wl,--no-as-needed -lrt" /> |
| 340 |
<env key="LIB_NAME" value="${nativeLibName}" /> |
| 341 |
</exec> |
| 342 |
</target> |
| 343 |
</configuration> |
| 344 |
</execution> |
| 345 |
</executions> |
| 346 |
</plugin> |
| 347 |
</plugins> |
| 348 |
</build> |
| 349 |
</profile> |
| 350 |
</profiles> |
| 351 |
|
| 352 |
<dependencies> |
| 353 |
<dependency> |
| 354 |
<groupId>io.netty</groupId> |
| 355 |
<artifactId>netty-common</artifactId> |
| 356 |
<version>${project.version}</version> |
| 357 |
</dependency> |
| 358 |
<dependency> |
| 359 |
<groupId>io.netty</groupId> |
| 360 |
<artifactId>netty-buffer</artifactId> |
| 361 |
<version>${project.version}</version> |
| 362 |
</dependency> |
| 363 |
<dependency> |
| 364 |
<groupId>io.netty</groupId> |
| 365 |
<artifactId>netty-transport</artifactId> |
| 366 |
<version>${project.version}</version> |
| 367 |
</dependency> |
| 368 |
</dependencies> |
| 369 |
</project> |