<?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>

    <parent>
        <groupId>org.caffinitas.ohc</groupId>
        <artifactId>ohc-parent</artifactId>
        <version>0.6.0</version>
        <relativePath>..</relativePath>
    </parent>

    <artifactId>ohc-core-j8</artifactId>
    <version>0.6.0</version>

    <name>OHC core - Java8 optimization</name>
    <description>Off-Heap concurrent hash map intended to store GBs of serialized data</description>
    <organization>
        <name>Robert Stupp, Koeln, Germany, robert-stupp.de</name>
        <url>http://caffinitas.org/</url>
    </organization>
    <url>http://caffinitas.org/</url>

    <prerequisites>
        <maven>3.2</maven>
    </prerequisites>

    <inceptionYear>2014</inceptionYear>
    <developers>
        <developer>
            <name>Robert Stupp</name>
            <email>robert@caffinitas.org</email>
        </developer>
    </developers>
    <contributors>
        <contributor>
            <name>Benedict Elliott Smith</name>
            <email>belliottsmith@datastax.com</email>
        </contributor>
        <contributor>
            <name>Ariel Weisberg</name>
            <email>ariel.weisberg@datastax.com</email>
        </contributor>
    </contributors>

    <licenses>
        <license>
            <name>Apache 2</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>Apache License Version 2.0</comments>
        </license>
    </licenses>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>
    <scm>
        <connection>scm:git:https://github.com/snazy/ohc.git</connection>
        <developerConnection>scm:git:https://github.com/snazy/ohc.git</developerConnection>
        <url>https://github.com/snazy/ohc</url>
    </scm>
    <issueManagement>
        <system>Github</system>
        <url>https://github.com/snazy/ohc</url>
    </issueManagement>

    <dependencies>

        <dependency>
            <groupId>org.caffinitas.ohc</groupId>
            <artifactId>ohc-core</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>org.xerial.snappy</groupId>
            <artifactId>snappy-java</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>net.jpountz.lz4</groupId>
            <artifactId>lz4</artifactId>
            <scope>test</scope>
        </dependency>

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

    </dependencies>

    <build>
        <plugins>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${version.org.apache.maven.plugins.maven-compiler-plugin}</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <systemProperties>
                        <org.caffinitas.ohc.disableJEmalloc>false</org.caffinitas.ohc.disableJEmalloc>
                        <org.caffinitas.ohc.debugOffHeapAccess>true</org.caffinitas.ohc.debugOffHeapAccess>
                    </systemProperties>
                    <testClassesDirectory>../ohc-core/target/test-classes</testClassesDirectory>
                    <testSourceDirectory>../ohc-core/src/test/java</testSourceDirectory>
                    <failIfNoTests>true</failIfNoTests>
                    <argLine>@{surefire.jvmargs}</argLine>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <executions>
                    <execution>
                        <id>bundle-manifest</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>manifest</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <instructions>
                        <Bundle-SymbolicName>org.caffinitas.ohc.ohc-core-v8</Bundle-SymbolicName>
                        <Bundle-Version>${project.version}</Bundle-Version>
                    </instructions>
                    <supportedProjectTypes>
                        <supportedProjectType>jar</supportedProjectType>
                        <supportedProjectType>bundle</supportedProjectType>
                        <supportedProjectType>pom</supportedProjectType>
                    </supportedProjectTypes>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <!-- same profiles as in ohc-core -->
    <profiles>
        <profile>
            <id>unsafe</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>unsafe</id>
                                <goals>
                                    <goal>test</goal>
                                </goals>
                                <configuration>
                                    <systemProperties>
                                        <org.caffinitas.ohc.allocator>unsafe</org.caffinitas.ohc.allocator>
                                        <org.caffinitas.ohc.debugOffHeapAccess>true</org.caffinitas.ohc.debugOffHeapAccess>
                                    </systemProperties>
                                    <reportsDirectory>${project.build.directory}/surefire-reports/unsafe</reportsDirectory>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>xxhash</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>xxhash</id>
                                <goals>
                                    <goal>test</goal>
                                </goals>
                                <configuration>
                                    <systemProperties>
                                        <org.caffinitas.ohc.hashAlgorithm>XX</org.caffinitas.ohc.hashAlgorithm>
                                        <org.caffinitas.ohc.allocator>jna</org.caffinitas.ohc.allocator>
                                        <org.caffinitas.ohc.debugOffHeapAccess>true</org.caffinitas.ohc.debugOffHeapAccess>
                                    </systemProperties>
                                    <reportsDirectory>${project.build.directory}/surefire-reports/xxhash</reportsDirectory>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>crc32</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>crc32</id>
                                <goals>
                                    <goal>test</goal>
                                </goals>
                                <configuration>
                                    <systemProperties>
                                        <org.caffinitas.ohc.hashAlgorithm>CRC32</org.caffinitas.ohc.hashAlgorithm>
                                        <org.caffinitas.ohc.allocator>jna</org.caffinitas.ohc.allocator>
                                        <org.caffinitas.ohc.debugOffHeapAccess>true</org.caffinitas.ohc.debugOffHeapAccess>
                                    </systemProperties>
                                    <reportsDirectory>${project.build.directory}/surefire-reports/crc32</reportsDirectory>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>prod-like</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>unsafe</id>
                                <goals>
                                    <goal>test</goal>
                                </goals>
                                <configuration>
                                    <systemProperties>
                                        <org.caffinitas.ohc.allocator>jna</org.caffinitas.ohc.allocator>
                                        <org.caffinitas.ohc.debugOffHeapAccess>false</org.caffinitas.ohc.debugOffHeapAccess>
                                    </systemProperties>
                                    <reportsDirectory>${project.build.directory}/surefire-reports/prod-like</reportsDirectory>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
