<?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>de.datexis</groupId>
  <artifactId>texoo</artifactId>
  <version>1.2.2</version>
  <packaging>pom</packaging>
  
  <name>TeXoo</name>
  <description>TeXoo is a framework for Deep Learning based text analytics in Java developed at DATEXIS, Beuth University of Applied Sciences Berlin.</description>
  <url>https://github.com/sebastianarnold/TeXoo</url>

  <licenses>
    <license>
      <name>The Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Sebastian Arnold</name>
      <email>sarnold@beuth-hochschule.de</email>
      <organization>DATEXIS</organization>
      <organizationUrl>http://www.datexis.de</organizationUrl>
    </developer>
    <developer>
      <name>Rudolf Schneider</name>
      <email>rudolf.schneider@beuth-hochschule.de</email>
      <organization>DATEXIS</organization>
      <organizationUrl>http://www.datexis.de</organizationUrl>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git://github.com/sebastianarnold/TeXoo.git</connection>
    <developerConnection>scm:git:git://github.com/sebastianarnold/TeXoo.git</developerConnection>
    <url>https://github.com/sebastianarnold/TeXoo</url>
  </scm>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <java.version>1.8</java.version>
    <texoo.version>1.2.2</texoo.version>
    <slf4j.version>1.7.25</slf4j.version>
    <logback.version>1.2.3</logback.version>
    <corenlp.version>3.8.0</corenlp.version>
    <dl4j.version>1.0.0-beta4</dl4j.version>
    <maven-shade-plugin.version>2.4.3</maven-shade-plugin.version>
    <exec-maven-plugin.version>1.4.0</exec-maven-plugin.version>
    <mockito-core.version>2.10.0</mockito-core.version>
    <java-hamcrest.version>2.0.0.0</java-hamcrest.version>
    <lucene.version>6.1.0</lucene.version>
    <doclint>none</doclint>
  </properties>
  
  <modules>
    <module>texoo-core</module>
    <module>texoo-retrieval</module>
    <module>texoo-cuda-9.2</module>
    <module>texoo-cuda-10.1</module>
    <module>texoo-encoder-api</module>
    <module>texoo-entity-recognition</module>
    <module>texoo-entity-linking</module>
    <module>texoo-sector</module>
    <module>texoo-examples</module>
  </modules>

  <profiles>
    <profile>
      <!-- automatically used for normal building -->
      <id>default</id>
      <activation>
        <activeByDefault>true</activeByDefault>
        <property>
          <name>!override</name>
        </property>
      </activation>
    </profile>
    <profile>
      <!-- use this profile to package a clean JAR (e.g. for maven deployment) -->
      <id>deploy-jar</id>
      <activation>
        <property>
          <name>override</name>
        </property>
      </activation>
      <modules>
        <module>texoo-core</module>
        <module>texoo-cuda-9.2</module>
        <module>texoo-cuda-10.1</module>
        <module>texoo-retrieval</module>
        <module>texoo-entity-recognition</module>
        <module>texoo-entity-linking</module>
        <module>texoo-sector</module>
      </modules>
      <build>
        <plugins>
          <plugin>
            <!-- build sources jar -->
            <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>
            <!-- build javadoc jar -->
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.0.1</version>
            <configuration>
              <!-- Default configuration for all reports -->
              <doclint>none</doclint>
              <quiet>true</quiet>
              <failOnError>false</failOnError>
              <additionalDependencies>
                <additionalDependency>
                  <groupId>com.google.code.findbugs</groupId>
                  <artifactId>annotations</artifactId>
                  <version>2.0.1</version>
                  <type>jar</type>
                </additionalDependency>
              </additionalDependencies>
            </configuration>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
              <execution>
                <id>aggregate</id>
                <goals>
                  <goal>aggregate</goal>
                </goals>
                <phase>site</phase>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <!-- sign with GPG -->
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <!-- use this profile to package a shaded "fat"-JAR (e.g. to run in Spark) -->
      <id>deploy-fatjar</id>
      <activation>
        <property>
          <name>override</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.1</version>
            <configuration>
              <source>${java.version}</source>
              <target>${java.version}</target>
            </configuration>
          </plugin>
          <plugin>
            <!-- shaded JAR configuration from dl4j-examples-->
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <version>${maven-shade-plugin.version}</version>
            <configuration>
              <shadedArtifactAttached>true</shadedArtifactAttached>
              <shadedClassifierName>bin</shadedClassifierName>
              <createDependencyReducedPom>true</createDependencyReducedPom>
              <filters>
                <filter>
                  <artifact>*:*</artifact>
                  <excludes>
                    <exclude>org/datanucleus/**</exclude>
                    <exclude>META-INF/*.SF</exclude>
                    <exclude>META-INF/*.DSA</exclude>
                    <exclude>META-INF/*.RSA</exclude>
                  </excludes>
                </filter>
              </filters>
            </configuration>
            <executions>
              <execution>
                <phase>package</phase>
                <goals>
                  <goal>shade</goal>
                </goals>
                <configuration>
                  <transformers>
                    <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
                      <resource>reference.conf</resource>
                    </transformer>
                    <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
                    <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                    </transformer>
                  </transformers>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>licenses</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>license-maven-plugin</artifactId>
            <version>1.16</version>
            <executions>
              <execution>
                <id>download-licenses</id>
                <goals>
                  <goal>download-licenses</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>eclipse-m2e</id>
      <activation>
        <property>
          <name>m2e.version</name>
        </property>
      </activation>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>org.eclipse.m2e</groupId>
              <artifactId>lifecycle-mapping</artifactId>
              <version>1.0.0</version>
              <configuration>
                <lifecycleMappingMetadata>
                  <pluginExecutions>
                    <pluginExecution>
                      <pluginExecutionFilter>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <versionRange>[1.7,)</versionRange>
                        <goals>
                          <goal>run</goal>
                        </goals>
                      </pluginExecutionFilter>
                      <action>
                        <ignore></ignore>
                      </action>
                    </pluginExecution>
                  </pluginExecutions>
                </lifecycleMappingMetadata>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>
  </profiles>
  
  <build>
    <plugins>
      <plugin>
        <!-- Set Max RAM usage for unit tests -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>3.0.0-M3</version>
        <configuration>
          <forkCount>1</forkCount>
          <reuseForks>true</reuseForks>
          <argLine>-Xms1G -Xmx4G -XX:+UseG1GC -Dorg.bytedeco.javacpp.maxbytes=4G -Dorg.bytedeco.javacpp.maxphysicalbytes=8G</argLine>
          <trimStackTrace>false</trimStackTrace>
          <!-- workaround for broken openjdk -->
          <useSystemClassLoader>false</useSystemClassLoader>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-report-plugin</artifactId>
        <version>3.0.0-M3</version>
        <!--<configuration>-->
          <!--<outputDirectory>${basedir}/target/newsite</outputDirectory>-->
        <!--</configuration>-->
      </plugin>
      <plugin>
        <!-- Plugin for mvn:exec-java -->
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>${exec-maven-plugin.version}</version>
      </plugin>
      <plugin>
        <groupId>net.revelc.code.formatter</groupId>
        <artifactId>formatter-maven-plugin</artifactId>
        <version>2.0.1</version>
        <configuration>
          <configFile>${project.basedir}/formatter.xml</configFile>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>versions-maven-plugin</artifactId>
        <version>2.7</version>
        <configuration>
          <generateBackupPoms>false</generateBackupPoms>
          <processAllModules>true</processAllModules>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-csv</artifactId>
      <version>1.4</version>
    </dependency>
    <!-- Test Dependencies -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>java-hamcrest</artifactId>
      <version>${java-hamcrest.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>${mockito-core.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

</project>

