| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| Licensed 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. See accompanying LICENSE file. |
| --> |
| <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> |
| <artifactId>ratis</artifactId> |
| <groupId>org.apache.ratis</groupId> |
| <version>0.2.0</version> |
| </parent> |
| |
| <artifactId>ratis-common</artifactId> |
| <name>Apache Ratis Common</name> |
| |
| <dependencies> |
| <dependency> |
| <artifactId>ratis-proto-shaded</artifactId> |
| <groupId>org.apache.ratis</groupId> |
| <scope>provided</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>org.slf4j</groupId> |
| <artifactId>slf4j-api</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>org.slf4j</groupId> |
| <artifactId>slf4j-log4j12</artifactId> |
| </dependency> |
| |
| <dependency> |
| <groupId>junit</groupId> |
| <artifactId>junit</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.mockito</groupId> |
| <artifactId>mockito-all</artifactId> |
| <scope>test</scope> |
| </dependency> |
| |
| <dependency> |
| <groupId>io.dropwizard.metrics</groupId> |
| <artifactId>metrics-core</artifactId> |
| <version>3.2.5</version> |
| </dependency> |
| |
| </dependencies> |
| |
| <profiles> |
| <profile> |
| <id>native</id> |
| <activation> |
| <activeByDefault>false</activeByDefault> |
| </activation> |
| <properties> |
| <runningWithNative>true</runningWithNative> |
| </properties> |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-enforcer-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>enforce-os</id> |
| <goals> |
| <goal>enforce</goal> |
| </goals> |
| <configuration> |
| <rules> |
| <requireOS> |
| <family>mac</family> |
| <family>unix</family> |
| <message>native build only supported on Mac or Unix</message> |
| </requireOS> |
| </rules> |
| <fail>true</fail> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>native-maven-plugin</artifactId> |
| <executions> |
| <execution> |
| <phase>compile</phase> |
| <goals> |
| <goal>javah</goal> |
| </goals> |
| <configuration> |
| <javahPath>${env.JAVA_HOME}/bin/javah</javahPath> |
| <javahClassNames> |
| <javahClassName>org.apache.ratis.io.nativeio.NativeIO</javahClassName> |
| <javahClassName>org.apache.ratis.util.NativeCrc32</javahClassName> |
| </javahClassNames> |
| <javahOutputDirectory>${project.build.directory}/native/javah</javahOutputDirectory> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.hadoop</groupId> |
| <artifactId>hadoop-maven-plugins</artifactId> |
| <executions> |
| <execution> |
| <id>cmake-compile</id> |
| <phase>compile</phase> |
| <goals><goal>cmake-compile</goal></goals> |
| <configuration> |
| <source>${basedir}/src</source> |
| <vars> |
| <GENERATED_JAVAH>${project.build.directory}/native/javah</GENERATED_JAVAH> |
| <JVM_ARCH_DATA_MODEL>${sun.arch.data.model}</JVM_ARCH_DATA_MODEL> |
| </vars> |
| </configuration> |
| </execution> |
| <execution> |
| <id>test_bulk_crc32</id> |
| <goals><goal>cmake-test</goal></goals> |
| <phase>test</phase> |
| <configuration> |
| <binary>${project.build.directory}/native/test_bulk_crc32</binary> |
| <timeout>1200</timeout> |
| <results>${project.build.directory}/native-results</results> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| </profiles> |
| </project> |