<?xml version="1.0" encoding="UTF-8"?>
<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>

    <groupId>com.facebook</groupId>
    <artifactId>slice</artifactId>
    <version>0.37</version>
    <packaging>jar</packaging>

    <name>slice</name>
    <description>Library for efficiently working with heap and off-heap memory</description>
    <url>https://github.com/prestodb/slice</url>

    <parent>
        <groupId>io.airlift</groupId>
        <artifactId>airbase</artifactId>
        <version>90</version>
    </parent>

    <inceptionYear>2012</inceptionYear>

    <properties>
        <air.javadoc.lint>-missing</air.javadoc.lint>
        <air.test.jvmsize>3584m</air.test.jvmsize>
        <dep.nexus-staging-plugin.version>1.6.8</dep.nexus-staging-plugin.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>com.github.spotbugs</groupId>
            <artifactId>spotbugs-annotations</artifactId>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.openjdk.jol</groupId>
            <artifactId>jol-core</artifactId>
            <version>0.2</version>
        </dependency>

        <!-- for testing -->
        <dependency>
            <groupId>net.jpountz.lz4</groupId>
            <artifactId>lz4</artifactId>
            <version>1.3.0</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.openjdk.jmh</groupId>
            <artifactId>jmh-core</artifactId>
            <version>${dep.jmh.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.openjdk.jmh</groupId>
            <artifactId>jmh-generator-annprocess</artifactId>
            <version>${dep.jmh.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <configuration>
                    <excludes combine.children="append">
                        <exclude>src/main/java/com/facebook/slice/Preconditions.java</exclude>
                        <exclude>src/main/java/com/facebook/slice/CountingInputStream.java</exclude>
                        <exclude>src/main/java/com/facebook/slice/CountingOutputStream.java</exclude>
                        <exclude>src/main/java/com/facebook/slice/LittleEndianDataInputStream.java</exclude>
                        <exclude>src/main/java/com/facebook/slice/LittleEndianDataOutputStream.java</exclude>
                    </excludes>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <preparationGoals>clean verify -DskipTests</preparationGoals>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>${dep.nexus-staging-plugin.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>oss-release</id>
            <properties>
                <!-- tests run in the preparation step of the release -->
                <skipTests>true</skipTests>
            </properties>
            <build>
                <plugins>
                    <!-- oss requires a javadoc jar. Build one when releasing. -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                    </plugin>
                    <!-- Sign artifacts using gpg for oss upload -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

  <scm>
    <tag>0.37</tag>
  </scm>
</project>
