blob: d335c36a3ed2706b6d65278e17087e440b38aa34 [file] [log] [blame]
<!--
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.
-->
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.bookkeeper</groupId>
<artifactId>bookkeeper</artifactId>
<version>4.9.2</version>
<relativePath>..</relativePath>
</parent>
<artifactId>cpu-affinity</artifactId>
<packaging>nar</packaging>
<name>Apache BookKeeper :: CPU Affinity Library</name>
<description>CPU Affinity Library</description>
<properties>
<nar.runtime>dynamic</nar.runtime>
</properties>
<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
<compilerArgs>
<!-- Object.finalize() is deprecated at java 9 -->
<!-- <compilerArg>-Werror</compilerArg> -->
<compilerArg>-Xlint:deprecation</compilerArg>
<compilerArg>-Xlint:unchecked</compilerArg>
<!-- https://issues.apache.org/jira/browse/MCOMPILER-205 -->
<compilerArg>-Xpkginfo:always</compilerArg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>com.github.maven-nar</groupId>
<artifactId>nar-maven-plugin</artifactId>
<version>${nar-maven-plugin.version}</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>${maven-assembly-plugin.version}</version>
<configuration>
<descriptors>
<descriptor>src/main/assembly/assembly.xml</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
<tarLongFileMode>posix</tarLongFileMode>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<configuration>
<excludes>
<!-- exclude test files -->
<exclude>**/src/test/resources/proc_cpuinfo.txt</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<!-- from JDK10 javah command is not available
see http://openjdk.java.net/jeps/313
-->
<id>jdk-without-javah</id>
<activation>
<jdk>[10,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.github.maven-nar</groupId>
<artifactId>nar-maven-plugin</artifactId>
<version>${nar-maven-plugin.version}</version>
<extensions>true</extensions>
<executions>
<execution>
<!-- javah is not present in JDK10 onwards,
you have to to use javac -h -->
<id>default-nar-javah</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<compilerArgs>
<!-- Object.finalize() is deprecated at java 9 -->
<!-- <compilerArg>-Werror</compilerArg> -->
<compilerArg>-Xlint:deprecation</compilerArg>
<compilerArg>-Xlint:unchecked</compilerArg>
<!-- https://issues.apache.org/jira/browse/MCOMPILER-205 -->
<compilerArg>-Xpkginfo:always</compilerArg>
<!-- add -h flag to javac -->
<compilerArg>-h</compilerArg>
<compilerArg>${project.build.directory}/nar/javah-include</compilerArg>
</compilerArgs>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>mac</id>
<activation>
<os>
<name>Mac OS X</name>
</os>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.github.maven-nar</groupId>
<artifactId>nar-maven-plugin</artifactId>
<version>${nar-maven-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<runtime>${nar.runtime}</runtime>
<output>cpu-affinity</output>
<libraries>
<library>
<type>jni</type>
<narSystemPackage>org.apache.bookkeeper.utils.affinity</narSystemPackage>
</library>
</libraries>
<cpp>
<optionSet>${nar.cpp.optionSet}</optionSet>
<exceptions>false</exceptions>
<rtti>false</rtti>
<optimize>full</optimize>
</cpp>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>Linux</id>
<activation>
<os>
<name>Linux</name>
</os>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.github.maven-nar</groupId>
<artifactId>nar-maven-plugin</artifactId>
<version>${nar-maven-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<runtime>${nar.runtime}</runtime>
<output>cpu-affinity</output>
<libraries>
<library>
<type>jni</type>
<narSystemPackage>org.apache.bookkeeper.utils.affinity</narSystemPackage>
</library>
</libraries>
<cpp>
<optionSet>${nar.cpp.optionSet}</optionSet>
<exceptions>false</exceptions>
<rtti>false</rtti>
<optimize>full</optimize>
</cpp>
<linker>
<libSet>rt</libSet>
</linker>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>