<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2012-2015 TORCH GmbH, 2015 Graylog, Inc.
  ~
  ~ This file is part of Graylog.
  ~
  ~ Graylog is free software: you can redistribute it and/or modify
  ~ it under the terms of the GNU General Public License as published by
  ~ the Free Software Foundation, either version 3 of the License, or
  ~ (at your option) any later version.
  ~
  ~ Graylog is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  ~ GNU General Public License for more details.
  ~
  ~ You should have received a copy of the GNU General Public License
  ~ along with Graylog.  If not, see <http://www.gnu.org/licenses />.
  -->
<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>
    <prerequisites>
        <maven>3.0.1</maven>
    </prerequisites>

    <artifactId>graylog2-bootstrap</artifactId>
    <packaging>jar</packaging>

    <parent>
        <groupId>org.graylog2</groupId>
        <artifactId>graylog2-parent</artifactId>
        <version>1.2.0</version>
    </parent>

    <name>graylog2-bootstrap</name>
    <description>Graylog Single Binary Bootstrapper</description>

    <licenses>
        <license>
            <name>GNU General Public License (GPL) version 3.0</name>
            <url>https://www.gnu.org/licenses/gpl-3.0.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <properties>
        <mainClass>org.graylog2.bootstrap.Main</mainClass>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.graylog2</groupId>
            <artifactId>graylog2-plugin</artifactId>
        </dependency>
        <dependency>
            <groupId>org.graylog2</groupId>
            <artifactId>graylog2-shared</artifactId>
        </dependency>
        <dependency>
            <groupId>io.airlift</groupId>
            <artifactId>airline</artifactId>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>apache-log4j-extras</artifactId>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <!-- git-commit-id-plugin depends on resource filtering to write the
                    git.properties and version.properties files-->
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>**/*.properties</include>
                </includes>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <finalName>graylog2</finalName>
                    <archive>
                        <manifest>
                            <mainClass>${mainClass}</mainClass>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>pl.project13.maven</groupId>
                <artifactId>git-commit-id-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>revision</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <prefix>git</prefix>
                    <dateFormat>dd.MM.yyyy '@' HH:mm:ss z</dateFormat>
                    <verbose>false</verbose>
                    <useNativeGit>true</useNativeGit>
                    <dotGitDirectory>${project.parent.relativePath}/.git</dotGitDirectory>
                    <skipPoms>true</skipPoms>
                    <failOnNoGitDirectory>false</failOnNoGitDirectory>
                    <abbrevLength>7</abbrevLength>
                    <skip>false</skip>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
</project>
