<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>ae.teletronics</groupId>
    <artifactId>godfather</artifactId>
    <version>0.9</version>
  </parent>

  <groupId>ae.teletronics.nlp</groupId>
  <artifactId>language-detector</artifactId>
  <version>0.3.0</version>
  <packaging>jar</packaging>
  <name>Language detector</name>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <scala.version>2.11.5</scala.version>
    <scala.compat.version>2.11</scala.compat.version>
    <scala.tools.version>2.15.2</scala.tools.version>
  </properties>

  <repositories>
    <repository>
      <id>jlangdetect-googlecode</id>
      <name>JLangDetect Maven repository</name>
      <url>https://jlangdetect.googlecode.com/svn/repo</url>
    </repository>
  </repositories>

  <dependencies>
    <dependency>
      <groupId>org.scala-lang</groupId>
      <artifactId>scala-library</artifactId>
      <version>${scala.version}</version>
    </dependency>
    <dependency>
      <groupId>com.optimaize.languagedetector</groupId>
      <artifactId>language-detector</artifactId>
      <version>0.5</version>
    </dependency>
    <dependency>
      <groupId>me.champeau.jlangdetect</groupId>
      <artifactId>jlangdetect-extra</artifactId>
      <version>0.4</version>
    </dependency>
    <dependency>
      <groupId>me.champeau.jlangdetect</groupId>
      <artifactId>jlangdetect-europarl</artifactId>
      <version>0.4</version>
    </dependency>
    <dependency>
      <groupId>me.champeau.jlangdetect</groupId>
      <artifactId>jlangdetect-parent</artifactId>
      <version>0.4</version>
    </dependency>
    <dependency>
      <groupId>org.apache.tika</groupId>
      <artifactId>tika-core</artifactId>
      <version>1.11</version>
    </dependency>
    <dependency>
      <groupId>com.carrotsearch</groupId>
      <artifactId>langid-java</artifactId>
      <version>1.0.0</version>
    </dependency>

    <dependency>
      <groupId>com.neovisionaries</groupId>
      <artifactId>nv-i18n</artifactId>
      <version>1.18</version>
    </dependency>
    <dependency>
      <groupId>com.google.code.findbugs</groupId>
      <artifactId>jsr305</artifactId>
      <version>3.0.1</version>
    </dependency>

    <!-- Test dependencies -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <sourceDirectory>src/main/scala</sourceDirectory>
    <testSourceDirectory>src/test/scala</testSourceDirectory>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>1.8</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>${project.build.directory}/genjavadoc</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <!-- see http://davidb.github.com/scala-maven-plugin -->
        <groupId>net.alchim31.maven</groupId>
        <artifactId>scala-maven-plugin</artifactId>
        <version>3.2.0</version>
        <executions>
          <execution>
            <goals>
              <goal>compile</goal>
              <goal>testCompile</goal>
            </goals>
            <configuration>
              <args>
                <arg>-dependencyfile</arg>
                <arg>${project.build.directory}/.scala_dependencies</arg>
              </args>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.5</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.scala-tools</groupId>
        <artifactId>maven-scala-plugin</artifactId>
        <version>${scala.tools.version}</version>
        <executions>
          <execution>
            <id>scala-compile-first</id>
            <phase>process-resources</phase>
            <goals>
              <goal>compile</goal>
            </goals>
            <configuration>
              <args>
                <arg>-P:genjavadoc:out=${project.build.directory}/genjavadoc</arg>
              </args>
              <compilerPlugins>
                <compilerPlugin>
                  <groupId>com.typesafe.genjavadoc</groupId>
                  <artifactId>genjavadoc-plugin_${scala.version}</artifactId>
                  <version>0.9</version>
                </compilerPlugin>
              </compilerPlugins>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <jvmArgs>
            <jvmArg>-Xms256m</jvmArg>
            <jvmArg>-Xmx2048m</jvmArg>
          </jvmArgs>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.9</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
