<?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>io.mfj</groupId>
  <artifactId>textricator</artifactId>
  <version>9.1.49</version>
  <name>${project.groupId}:${project.artifactId}</name>
  <description>A tool to extract text from documents and generate structured data</description>
  <url>https://textricator.mfj.io/</url>
  <developers>
    <developer>
      <name>Measures for Justice</name>
      <email>opensource@measuresforjustice.org</email>
      <organization>Measures for Justice</organization>
      <organizationUrl>https://measuresforjustice.org/</organizationUrl>
    </developer>
  </developers>
  <licenses>
    <license>
      <name>GNU Affero General Public License, Version 3</name>
      <url>https://www.gnu.org/licenses/agpl-3.0.txt</url>
    </license>
  </licenses>
  <properties>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <kotlin.version>1.3.10</kotlin.version>
    <dokka.version>0.9.17</dokka.version>
    <copyright.year>2018</copyright.year>
    <source.location>https://github.com/measuresforjustice/textricator</source.location>
  </properties>
  <dependencies>
    <dependency>
      <groupId>org.jetbrains.kotlin</groupId>
      <artifactId>kotlin-stdlib-jdk8</artifactId>
      <version>${kotlin.version}</version>
      <!-- Apache 2.0 -->
    </dependency>
    <dependency>
      <groupId>org.jetbrains.kotlin</groupId>
      <artifactId>kotlin-test-junit</artifactId>
      <version>${kotlin.version}</version>
      <!-- Apache 2.0 -->
      <scope>test</scope>
    </dependency>
    <!-- kotlin-reflect is a dependency of com.fasterxml.jackson.module:jackson-module-kotlin.
    Include it here and exclude it below to make sure it is the same version of Kotlin. -->
    <dependency>
      <groupId>org.jetbrains.kotlin</groupId>
      <artifactId>kotlin-reflect</artifactId>
      <version>${kotlin.version}</version>
      <!-- Apache 2.0 -->
    </dependency>
    <dependency>
      <groupId>io.mfj</groupId>
      <artifactId>expr</artifactId>
      <version>4.1.14</version>
      <!-- Apache 2.0 -->
    </dependency>
    <!-- PDFBox -->
    <dependency>
      <groupId>org.apache.pdfbox</groupId>
      <artifactId>pdfbox</artifactId>
      <version>2.0.12</version>
      <!-- Apache 2.0 -->
    </dependency>
    <dependency>
      <groupId>org.apache.pdfbox</groupId>
      <artifactId>pdfbox-tools</artifactId>
      <version>2.0.12</version>
      <!-- Apache 2.0 -->
    </dependency>
    <!-- iText 5 -->
    <dependency>
      <groupId>com.itextpdf</groupId>
      <artifactId>itextpdf</artifactId>
      <version>5.5.13</version>
      <!-- AGPL -->
    </dependency>
    <dependency>
      <groupId>org.bouncycastle</groupId>
      <artifactId>bcprov-jdk15on</artifactId>
      <version>1.50</version>
      <!-- MIT -->
    </dependency>
    <!-- iText 7 -->
    <dependency>
      <groupId>com.itextpdf</groupId>
      <artifactId>kernel</artifactId>
      <version>7.1.4</version>
      <!-- AGPL -->
    </dependency>
    <dependency>
      <groupId>com.itextpdf</groupId>
      <artifactId>layout</artifactId>
      <version>7.1.4</version>
      <!-- AGPL -->
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>2.9.8</version>
      <!-- Apache 2.0 -->
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.dataformat</groupId>
      <artifactId>jackson-dataformat-yaml</artifactId>
      <version>2.9.8</version>
      <!-- Apache 2.0 -->
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.module</groupId>
      <artifactId>jackson-module-kotlin</artifactId>
      <version>2.9.8</version>
      <!-- Apache 2.0 -->
      <exclusions>
        <exclusion>
          <groupId>org.jetbrains.kotlin</groupId>
          <artifactId>kotlin-stdlib</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.jetbrains.kotlin</groupId>
          <artifactId>kotlin-reflect</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.7.25</version>
      <!-- MIT -->
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <version>1.7.25</version>
      <!-- MIT -->
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-csv</artifactId>
      <version>1.4</version>
      <!-- Apache 2.0 -->
    </dependency>
    <dependency>
      <groupId>com.offbytwo</groupId>
      <artifactId>docopt</artifactId>
      <version>0.6.0.20150202</version>
      <!-- MIT -->
    </dependency>
  </dependencies>
  <build>
    <!-- inject version into version.properties. -->
    <!-- Is there a better way to do this (besides switching to gradle, obviously)? -->
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
        <includes>
          <include>**/version.properties</include>
        </includes>
      </resource>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>false</filtering>
        <excludes>
          <exclude>**/version.properties</exclude>
        </excludes>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <groupId>org.jetbrains.kotlin</groupId>
        <artifactId>kotlin-maven-plugin</artifactId>
        <version>${kotlin.version}</version>
        <executions>
          <execution>
            <id>compile</id>
            <phase>compile</phase>
            <goals>
              <goal>compile</goal>
            </goals>
            <configuration>
              <sourceDirs>
                <source>${project.basedir}/src/main/java</source>
              </sourceDirs>
            </configuration>
          </execution>
          <execution>
            <id>test-compile</id>
            <phase>test-compile</phase>
            <goals>
              <goal>test-compile</goal>
            </goals>
            <configuration>
              <sourceDirs>
                <source>${project.basedir}/src/test/java</source>
              </sourceDirs>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>1.4.0</version>
        <executions>
          <execution>
            <goals>
              <goal>java</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.jetbrains.dokka</groupId>
        <artifactId>dokka-maven-plugin</artifactId>
        <version>${dokka.version}</version>
        <executions>
          <execution>
            <phase>prepare-package</phase>
            <goals>
              <goal>dokka</goal>
              <goal>javadoc</goal>
              <goal>javadocJar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.0.1</version>
        <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>2.22.1</version>
        <configuration>
          <useSystemClassLoader>false</useSystemClassLoader>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>2.6</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <descriptors>
            <descriptor>src/assembly/tgz.xml</descriptor>
            <descriptor>src/assembly/zip.xml</descriptor>
          </descriptors>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>1.4.1</version>
        <executions>
          <execution>
            <id>enforce-no-snapshots</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireReleaseDeps>
                  <message>Cannot have snapshot dependencies of a release!</message>
                  <onlyWhenRelease>true</onlyWhenRelease>
                  <searchTransitive>true</searchTransitive>
                  <failWhenParentIsSnapshot>true</failWhenParentIsSnapshot>
                </requireReleaseDeps>
              </rules>
              <fail>true</fail>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <scm>
    <connection>scm:git:git://github.com/measuresforjustice/textricator.git</connection>
    <developerConnection>scm:git:git://github.com/measuresforjustice/textricator.git</developerConnection>
    <url>https://github.com/measuresforjustice/textricator/tree/master</url>
  </scm>
</project>
