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

  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.carrot2</groupId>
    <artifactId>morfologik-parent</artifactId>
    <version>2.1.3</version>
    <relativePath>../pom.xml</relativePath>
  </parent>

  <artifactId>morfologik-tools</artifactId>
  <packaging>jar</packaging>

  <name>Morfologik Command Line Tools</name>
  <description>Morfologik Command Line Tools</description>

  <properties>
    <forbiddenapis.signaturefile>../etc/forbidden-apis/signatures.txt</forbiddenapis.signaturefile>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.carrot2</groupId>
      <artifactId>morfologik-fsa</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.carrot2</groupId>
      <artifactId>morfologik-fsa-builders</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.carrot2</groupId>
      <artifactId>morfologik-stemming</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>com.beust</groupId>
      <artifactId>jcommander</artifactId>
      <version>1.48</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <mainClass>morfologik.tools.Launcher</mainClass>
              <addClasspath>true</addClasspath>
            </manifest>
          </archive>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <id>package-zip</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <formats>
                <format>zip</format>
              </formats>
              <descriptors>
                <descriptor>src/main/assembly/package.xml</descriptor>
              </descriptors>
              <attach>false</attach>
              <appendAssemblyId>true</appendAssemblyId>
              <finalName>${project.artifactId}-${project.version}</finalName>
            </configuration>
          </execution>

          <execution>
            <id>package-dir</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <formats>
                <format>dir</format>
              </formats>
              <descriptors>
                <descriptor>src/main/assembly/package.xml</descriptor>
              </descriptors>
              <attach>false</attach>
              <appendAssemblyId>false</appendAssemblyId>
              <finalName>${project.artifactId}-${project.version}</finalName>
            </configuration>
          </execution>          
        </executions>
      </plugin>    

      <plugin>
        <groupId>de.thetaphi</groupId>
        <artifactId>forbiddenapis</artifactId>
        <version>${version.forbiddenapis}</version>

        <executions>
          <execution>
            <id>forbidden-apis</id>
            <configuration>
              <bundledSignatures combine.self="override">
                <bundledSignature>jdk-unsafe</bundledSignature>
                <bundledSignature>jdk-deprecated</bundledSignature>
              </bundledSignatures>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
