<?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>io.airlift</groupId>
        <artifactId>airbase</artifactId>
        <version>95</version>
    </parent>

    <groupId>com.halibobor</groupId>
    <artifactId>leveldb-project</artifactId>
    <version>1.18.3</version>
    <packaging>pom</packaging>

    <description>Port of LevelDB to Java</description>
    <url>http://github.com/halibobor/leveldb-java</url>

    <modules>
        <module>leveldb-api</module>
        <module>leveldb</module>
        <module>leveldb-benchmark</module>
    </modules>

    <inceptionYear>2011</inceptionYear>

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

    <developers>
        <developer>
            <id>dain</id>
            <name>Dain Sundstrom</name>
            <email>dain@iq80.com</email>
        </developer>
        <developer>
            <id>chirino</id>
            <name>Hiram Chirino</name>
            <email>hiram@hiramchirino.com</email>
            <url>http://hiramchirino.com</url>
            <timezone>-5</timezone>
        </developer>
        <developer>
            <id>halibobo</id>
            <name>halibobo1205</name>
            <email>halibobo1205@gmail.com</email>
            <roles>
                <role>Developer</role>
            </roles>
            <timezone>+8</timezone>
        </developer>
    </developers>

    <scm>
        <connection>scm:https://github.com/halibobor/leveldb-java.git</connection>
        <developerConnection>scm:https://github.com/halibobor/leveldb-java.git</developerConnection>
        <url>https://github.com/halibobor/leveldb-java/tree/master</url>
      <tag>HEAD</tag>
  </scm>

    <properties>
        <air.check.skip-spotbugs>true</air.check.skip-spotbugs>
        <air.check.skip-pmd>true</air.check.skip-pmd>
        <air.check.skip-jacoco>true</air.check.skip-jacoco>

        <air.check.skip-checkstyle>${air.check.skip-basic}</air.check.skip-checkstyle>
        <air.check.fail-checkstyle>${air.check.fail-basic}</air.check.fail-checkstyle>

        <air.javadoc.lint>-missing</air.javadoc.lint>
        <air.license.header-file>src/license/LICENSE-HEADER.txt</air.license.header-file>
        <air.checkstyle.config-file>${air.main.basedir}/src/checkstyle/checks.xml</air.checkstyle.config-file>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <gpg.keyname>0xEF7F2D6C</gpg.keyname>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.halibobor</groupId>
                <artifactId>leveldb-api</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>com.halibobor</groupId>
                <artifactId>leveldb</artifactId>
                <version>${project.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>3.1.0</version>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <configuration>
                            <skip>${air.check.skip-checkstyle}</skip>
                            <failOnViolation>${air.check.fail-checkstyle}</failOnViolation>
                            <consoleOutput>true</consoleOutput>
                            <includeTestSourceDirectory>true</includeTestSourceDirectory>
                            <configLocation>${air.main.basedir}/src/checkstyle/checks.xml</configLocation>
                            <excludes>**/com/facebook/presto/operator/PagesIndexOrdering.java</excludes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <!--
          Run the release /w the -P release flag to enable the release profile.
        -->
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <!-- We want to sign the artifact, the POM, and all attached artifacts -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.0.1</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <keyname>${gpg.keyname}</keyname>
                                    <passphraseServerId>${gpg.keyname}</passphraseServerId>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

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

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <configuration>
                            <encoding>${project.build.sourceEncoding}</encoding>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <configuration>
                            <source>1.8</source>
                            <target>1.8</target>
                            <fork>true</fork>
                            <verbose>true</verbose>
                            <encoding>UTF-8</encoding>
                            <showWarnings>false</showWarnings>
                        </configuration>
                    </plugin>

                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.7</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>

                </plugins>

            </build>
        </profile>

        <profile>
            <id>enforce-no-snapshots</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-enforcer-plugin</artifactId>
                        <version>1.0</version>
                        <executions>
                            <execution>
                                <id>enforce-no-snapshots</id>
                                <goals><goal>enforce</goal></goals>
                                <configuration>
                                    <rules>
                                        <requireReleaseVersion>
                                            <message>No Snapshots Allowed!</message>
                                        </requireReleaseVersion>
                                        <requireReleaseDeps>
                                            <message>No Snapshots Allowed!</message>
                                        </requireReleaseDeps>
                                    </rules>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
