<?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/maven-v4_0_0.xsd">
  <parent>
    <artifactId>graylog2-parent</artifactId>
    <groupId>org.graylog2</groupId>
    <version>0.92.0</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>graylog2-server</artifactId>
  <name>graylog2-server</name>
  <prerequisites>
    <maven>3.0.1</maven>
  </prerequisites>
  <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>
  <build>
    <resources>
      <resource>
        <filtering>true</filtering>
        <directory>src/main/resources</directory>
        <includes>
          <include>**/*.properties</include>
        </includes>
      </resource>
      <resource>
        <directory>src/main/resources</directory>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <finalName>graylog2-server</finalName>
          <archive>
            <manifest>
              <mainClass>${mainClass}</mainClass>
            </manifest>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <transformers>
            <transformer />
            <transformer>
              <mainClass>${mainClass}</mainClass>
            </transformer>
          </transformers>
          <minimizeJar>false</minimizeJar>
          <filters>
            <filter>
              <artifact>log4j:apache-log4j-extras</artifact>
              <includes>
                <include>**</include>
              </includes>
            </filter>
            <filter>
              <artifact>log4j:log4j</artifact>
              <includes>
                <include>**</include>
              </includes>
            </filter>
          </filters>
        </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>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <attach>false</attach>
          <appendAssemblyId>false</appendAssemblyId>
          <descriptors>
            <descriptor>src/main/assembly/graylog2-server.xml</descriptor>
          </descriptors>
          <outputDirectory>${project.parent.build.directory}/assembly</outputDirectory>
          <finalName>${project.artifactId}-${project.version}-${maven.build.timestamp}</finalName>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.mycila</groupId>
        <artifactId>license-maven-plugin</artifactId>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <configuration>
              <finalName>${project.artifactId}-${project.version}</finalName>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  <dependencies>
    <dependency>
      <groupId>org.testng</groupId>
      <artifactId>testng</artifactId>
      <version>6.8.8</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>bsh</artifactId>
          <groupId>org.beanshell</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-all</artifactId>
      <version>1.9.5</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <reporting>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>versions-maven-plugin</artifactId>
        <version>2.1</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>dependency-updates-report</report>
              <report>plugin-updates-report</report>
              <report>property-updates-report</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.mnode.ical4j</groupId>
        <artifactId>ical4j</artifactId>
        <version>1.0.2</version>
        <exclusions>
          <exclusion>
            <artifactId>commons-logging</artifactId>
            <groupId>commons-logging</groupId>
          </exclusion>
        </exclusions>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <properties>
    <mainClass>org.graylog2.Main</mainClass>
  </properties>
</project>

