<?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>org.caffinitas.ohc</groupId>
    <artifactId>ohc-parent</artifactId>
    <version>0.4.4</version>
    <packaging>pom</packaging>

    <name>OHC parent</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/issues</url>
    </issueManagement>

    <modules>
        <module>ohc-core</module>
        <module>ohc-core-j8</module>
        <module>ohc-benchmark</module>
        <module>ohc-jmh</module>
    </modules>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <version.com.google.guava>16.0</version.com.google.guava>
        <version.external.atlassian.jgitflow.jgitflow-maven-plugin>1.0-m5.1</version.external.atlassian.jgitflow.jgitflow-maven-plugin>
        <version.net.java.dev.jna>4.1.0</version.net.java.dev.jna>
        <version.net.jpountz.lz4>1.3</version.net.jpountz.lz4>
        <version.org.apache.maven.plugins.maven-compiler-plugin>3.3</version.org.apache.maven.plugins.maven-compiler-plugin>
        <version.org.apache.maven.plugins.maven-gpg-plugin>1.6</version.org.apache.maven.plugins.maven-gpg-plugin>
        <version.org.apache.maven.plugins.maven-javadoc-plugin>2.10.3</version.org.apache.maven.plugins.maven-javadoc-plugin>
        <version.org.apache.maven.plugins.maven-project-info-reports-plugin>2.8</version.org.apache.maven.plugins.maven-project-info-reports-plugin>
        <version.org.apache.maven.plugins.maven-site-plugin>3.4</version.org.apache.maven.plugins.maven-site-plugin>
        <version.org.apache.maven.plugins.maven-source-plugin>2.4</version.org.apache.maven.plugins.maven-source-plugin>
        <version.org.apache.maven.plugins.maven-surefire-plugin>2.18.1</version.org.apache.maven.plugins.maven-surefire-plugin>
        <version.org.apache.maven.plugins.maven-surefire-report-plugin>2.18.1</version.org.apache.maven.plugins.maven-surefire-report-plugin>
        <version.org.apache.logging.log4j>2.3</version.org.apache.logging.log4j>
        <version.org.codehaus.mojo.cobertura>2.7</version.org.codehaus.mojo.cobertura>
        <version.org.slf4j>1.7.12</version.org.slf4j>
        <version.org.testng>6.9.4</version.org.testng>
        <version.org.xerial.snappy>1.1.1.7</version.org.xerial.snappy>
    </properties>

    <dependencyManagement>
        <dependencies>

            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-api</artifactId>
                <version>${version.org.apache.logging.log4j}</version>
                <scope>test</scope>
                <exclusions>
                    <exclusion>
                        <groupId>com.sun.jdmk</groupId>
                        <artifactId>jmxtools</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>com.sun.jmx</groupId>
                        <artifactId>jmxri</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-core</artifactId>
                <version>${version.org.apache.logging.log4j}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-slf4j-impl</artifactId>
                <version>${version.org.apache.logging.log4j}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${version.org.slf4j}</version>
            </dependency>

            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${version.com.google.guava}</version>
            </dependency>

            <dependency>
                <groupId>org.xerial.snappy</groupId>
                <artifactId>snappy-java</artifactId>
                <version>${version.org.xerial.snappy}</version>
            </dependency>

            <dependency>
                <groupId>net.java.dev.jna</groupId>
                <artifactId>jna</artifactId>
                <version>${version.net.java.dev.jna}</version>
            </dependency>

            <dependency>
                <groupId>net.jpountz.lz4</groupId>
                <artifactId>lz4</artifactId>
                <version>${version.net.jpountz.lz4}</version>
            </dependency>

            <dependency>
                <groupId>org.testng</groupId>
                <artifactId>testng</artifactId>
                <version>${version.org.testng}</version>
                <scope>test</scope>
            </dependency>

        </dependencies>
    </dependencyManagement>

    <build>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${version.org.apache.maven.plugins.maven-source-plugin}</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>

        <pluginManagement>
            <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.7</source>
                        <target>1.7</target>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${version.org.apache.maven.plugins.maven-javadoc-plugin}</version>
                    <configuration>
                        <windowtitle>Off-Heap Cache</windowtitle>
                        <bottom>&amp;copy; 2014 ${project.organization.name} - licensed under &lt;a
                            href="http://www.apache.org/licenses/LICENSE-2.0" target="_new"&gt;Apache License, Version 2&lt;/a&gt;
                            - &lt;a href="http://caffinitas.org/" target="_new"&gt;Homepage&lt;/a&gt;</bottom>
                        <show>protected</show>
                        <includeDependencySources>false</includeDependencySources>
                        <includeTransitiveDependencySources>false</includeTransitiveDependencySources>
                    </configuration>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${version.org.apache.maven.plugins.maven-surefire-plugin}</version>
                </plugin>

            </plugins>
        </pluginManagement>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>${version.org.apache.maven.plugins.maven-project-info-reports-plugin}</version>
                <configuration>
                    <dependencyDetailsEnabled>true</dependencyDetailsEnabled>
                </configuration>
                <reportSets>
                    <reportSet>
                        <reports>
                            <!--
                            <report>cim</report>
                            <report>dependencies</report>
                            <report>index</report>
                            <report>dependency-info</report> uses parent pom - makes no sense...
                            -->
                            <report>summary</report>
                            <report>modules</report>
                            <report>cobertura</report>
                            <report>project-team</report>
                            <report>scm</report>
                            <report>issue-tracking</report>
                            <report>mailing-list</report>
                            <report>license</report>
                            <report>distribution-management</report>
                            <report>dependency-convergence</report>
                            <report>dependency-management</report>
                            <report>help</report>
                            <report>plugin-management</report>
                            <report>plugins</report>
                        </reports>
                    </reportSet>
                </reportSets>
                <inherited>false</inherited>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-report-plugin</artifactId>
                <version>${version.org.apache.maven.plugins.maven-surefire-report-plugin}</version>
                <configuration>
                    <reportsDirectories>
                        <reportsDirectory>ohc-core/target/surefire-reports/unsafe</reportsDirectory>
                        <reportsDirectory>ohc-core/target/surefire-reports/xxhash</reportsDirectory>
                        <reportsDirectory>ohc-core/target/surefire-reports/crc32</reportsDirectory>
                        <reportsDirectory>ohc-core/target/surefire-reports/normal</reportsDirectory>
                    </reportsDirectories>
                </configuration>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>report</report>
                        </reports>
                    </reportSet>
                </reportSets>
                <inherited>false</inherited>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <windowtitle>Off-Heap concurrent hash map</windowtitle>
                    <bottom>&amp;copy; 2014 ${project.organization.name} - licensed under &lt;a
                        href="http://www.apache.org/licenses/LICENSE-2.0" target="_new"&gt;Apache License, Version 2&lt;/a&gt;
                        - &lt;a href="http://caffinitas.org/" target="_new"&gt;Homepage&lt;/a&gt;</bottom>
                    <show>protected</show>
                    <failOnError>false</failOnError>
                    <includeDependencySources>true</includeDependencySources>
                    <includeTransitiveDependencySources>false</includeTransitiveDependencySources>
                </configuration>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>aggregate</report>
                        </reports>
                    </reportSet>
                </reportSets>
                <inherited>false</inherited>
            </plugin>
        </plugins>
    </reporting>

    <profiles>
        <profile>
            <id>javadoc</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>deploy</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                    </plugin>

                    <plugin>
                        <groupId>external.atlassian.jgitflow</groupId>
                        <artifactId>jgitflow-maven-plugin</artifactId>
                        <version>${version.external.atlassian.jgitflow.jgitflow-maven-plugin}</version>
                        <configuration>
                            <allowSnapshots>false</allowSnapshots>
                            <autoVersionSubmodules>true</autoVersionSubmodules>
                            <pushReleases>false</pushReleases>
                            <scmCommentPrefix>[GITFLOW]</scmCommentPrefix>
                            <keepBranch>false</keepBranch>
                            <noDeploy>false</noDeploy>
                        </configuration>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${version.org.apache.maven.plugins.maven-gpg-plugin}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <!--
        Release deployment procecure:

            mvn clean
            mvn jgitflow:release-start -Pdeploy
            mvn jgitflow:release-finish -Pdeploy
            (git push required unless -DpushReleases=true)

            ALTERNATIVE:

            mvn clean
            mvn jgitflow:release-start -Pdeploy
            mvn jgitflow:release-finish -Pdeploy -DkeepBranch=true -DnoDeploy=true
            (...)
            mvn deploy
            (git push required unless -DpushReleases=true on release-finish)

        -->

    </profiles>

</project>
