<?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>
  
  <parent>
    <groupId>de.datexis</groupId>
    <artifactId>texoo</artifactId>
    <relativePath>../pom.xml</relativePath>
    <version>1.3.2</version>
  </parent>

  <groupId>de.datexis</groupId>
  <artifactId>texoo-core</artifactId>
  <packaging>jar</packaging>
  
  <name>TeXoo-core</name>
  <description>TeXoo core library.
    ${parent.description}</description>

  <profiles>
    <profile>
      <!-- automatically used for normal building -->
      <id>default</id>
      <activation>
        <activeByDefault>true</activeByDefault>
        <property>
          <name>!override</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <!-- Copy configuration template to properties -->
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-antrun-plugin</artifactId>
            <version>1.7</version>
            <executions>
              <execution>
                <id>copy-configuration-files</id>
                <phase>compile</phase>
                <goals>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <target>
                    <ant antfile="build.xml" />
                  </target>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>deploy-jar</id>
      <activation>
        <property>
          <name>override</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
              <execution>
                <phase>compile</phase>
                <goals>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <tasks>
                    <!-- don't include user texoo.properties in deployment -->
                    <delete file="${project.build.outputDirectory}/texoo.properties"/>
                    <copy   file="${project.build.outputDirectory}/texoo.properties.template"
                          tofile="${project.build.outputDirectory}/texoo.properties"/>
                    <delete file="${project.build.outputDirectory}/texoo.properties.template"/>
                  </tasks>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>cuda-9.2</id>
      <activation>
        <property>
          <name>env.TEXOO_CUDA</name>
          <value>9.2</value>
        </property>
        <activeByDefault>false</activeByDefault>
      </activation>
      <dependencies>
        <dependency>
          <groupId>de.datexis</groupId>
          <artifactId>texoo-cuda-9.2</artifactId>
          <version>${texoo.version}</version>
          <type>pom</type>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>cuda-10.1</id>
      <activation>
        <property>
          <name>env.TEXOO_CUDA</name>
          <value>10.1</value>
        </property>
        <activeByDefault>false</activeByDefault>
      </activation>
      <dependencies>
        <dependency>
          <groupId>de.datexis</groupId>
          <artifactId>texoo-cuda-10.1</artifactId>
          <version>${texoo.version}</version>
          <type>pom</type>
        </dependency>
      </dependencies>
    </profile>
  </profiles>

  <build>
    <resources>
      <resource>
        <!-- Copy properties with filtering -->
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
        <includes>
          <include>**/*.properties</include>
          <include>**/*.properties.template</include>
        </includes>
      </resource>
      <resource>
        <!-- Copy everything else unfiltered -->
        <directory>src/main/resources</directory>
        <excludes>
          <exclude>**/*.properties</exclude>
          <exclude>**/*.properties.template</exclude>
        </excludes>
      </resource>
    </resources>
  </build>

  <dependencies>
    
    <!-- Logging -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>${slf4j.version}</version>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>${logback.version}</version>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-core</artifactId>
      <version>${logback.version}</version>
    </dependency>

    <!-- Deeplearning4j -->
    <!-- Apache 2.0 License https://deeplearning4j.org/ -->
    <dependency>
      <groupId>org.deeplearning4j</groupId>
      <artifactId>deeplearning4j-core</artifactId>
      <version>${dl4j.version}</version>
      <type>jar</type>
    </dependency>
    <dependency>
      <groupId>org.deeplearning4j</groupId>
      <artifactId>deeplearning4j-nlp</artifactId>
      <version>${dl4j.version}</version>
      <type>jar</type>
    </dependency>
    <dependency>
      <groupId>org.nd4j</groupId>
      <artifactId>nd4j-native</artifactId>
      <version>${dl4j.version}</version>
    </dependency>

    <!-- FastText for Java (MIT license)-->
    <dependency>
      <groupId>com.github.sszuev</groupId>
      <artifactId>fasttext</artifactId>
      <version>1.0.0</version>
      <exclusions>
        <exclusion>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-log4j12</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    
    <!-- Apache OpenNLP (Apache V2 License) -->
    <dependency>
      <groupId>org.apache.opennlp</groupId>
      <artifactId>opennlp-tools</artifactId>
      <version>${opennlp.version}</version>
    </dependency>
    
    <!-- updated XML helpers -->
    <dependency>
        <groupId>xerces</groupId>
        <artifactId>xercesImpl</artifactId>
        <version>2.11.0</version>
    </dependency>
    <dependency>
        <groupId>xml-apis</groupId>
        <artifactId>xml-apis</artifactId>
        <version>1.4.01</version>
    </dependency>
    
    <!-- Miscellaneous helpers -->
    <dependency>
      <groupId>info.debatty</groupId>
      <artifactId>java-string-similarity</artifactId>
      <version>1.1.0</version>
      <!-- MIT License https://github.com/tdebatty/java-string-similarity/ -->
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>2.10.2</version>
      <!-- Apache 2.0 License https://github.com/FasterXML/jackson -->
    </dependency>
    <dependency>
      <groupId>com.optimaize.languagedetector</groupId>
      <artifactId>language-detector</artifactId>
      <version>0.6</version>
      <exclusions>
        <exclusion>
          <groupId>com.google.guava</groupId>
          <artifactId>guava</artifactId>
        </exclusion>
      </exclusions>
      <!-- Apache 2.0 License https://github.com/optimaize/language-detector -->
    </dependency>
    <dependency>
      <groupId>org.reflections</groupId>
      <artifactId>reflections</artifactId>
      <version>0.9.11</version>
      <type>jar</type>
    </dependency>
    <dependency>
      <groupId>commons-cli</groupId>
      <artifactId>commons-cli</artifactId>
      <version>1.4</version>
    </dependency>
    
  </dependencies>
  
</project>
