<?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.julielab</groupId>
        <artifactId>julielab-gene-mapper</artifactId>
        <version>2.5.0</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>gene-species-assignment</artifactId>
    <version>1.0.0</version>

    <name>GeNoSa</name>

    <dependencies>
        <dependency>
            <groupId>de.julielab</groupId>
            <artifactId>gene-mapper-experimental-base</artifactId>
            <version>1.0.0</version>
        </dependency>
        <dependency>
            <groupId>de.julielab</groupId>
            <artifactId>gene-candidate-retrieval</artifactId>
            <version>2.5.0</version>
        </dependency>
        <dependency>
            <groupId>de.julielab</groupId>
            <artifactId>jcore-types</artifactId>
            <version>2.6.0</version>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-launcher</artifactId>
            <version>1.6.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>3.11.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>de.julielab</groupId>
            <artifactId>julielab-smac-utilities</artifactId>
            <version>1.0.0</version>
            <scope>provided</scope>
        </dependency>
        <!-- Only here for tests with spell checker, can be removed if the spell checker is not used -->
        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-suggest</artifactId>
            <version>${lucene-version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.uima</groupId>
            <artifactId>ruta-core</artifactId>
            <version>2.8.1</version>
        </dependency>
        <dependency>
            <groupId>de.julielab</groupId>
            <artifactId>jcore-utilities</artifactId>
            <version>${jcore-utilities-version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.2.0</version>
                <configuration>
                    <!-- exclude logback.xml -->
                    <excludes>
                        <exclude>**/logback.xml</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <!-- To create the descriptors and type systems for the RUTA-based components, put the RUTA script
                in src/main/resources/de/julielab/jcore/ae/genemapper/desc and mvn build the project -->
                <groupId>org.apache.uima</groupId>
                <artifactId>ruta-maven-plugin</artifactId>
                <version>2.8.1</version>
                <configuration>

                    <!-- The directory where the generated type system descriptors will
                     be written stored. -->
                    <!-- default value: ${project.build.directory}/generated-sources/
                      ruta/descriptor -->
                    <typeSystemOutputDirectory>${project.build.directory}/classes</typeSystemOutputDirectory>

                    <!-- The directory where the generated analysis engine descriptors will
                     be stored. -->
                    <!-- default value: ${project.build.directory}/generated-sources/ruta/
                      descriptor -->
                    <analysisEngineOutputDirectory>${project.build.directory}/classes</analysisEngineOutputDirectory>

                    <!-- The template descriptor for the generated type system.
                     By default the descriptor of the maven dependency is loaded. -->
                    <!-- default value: none -->
                    <!-- not used in this example <typeSystemTemplate>...
                      </typeSystemTemplate> -->

                    <!-- The template descriptor for the generated analysis engine.
                      By default the descriptor of the maven dependency is loaded. -->
                    <!-- default value: none -->
                    <!-- not used in this example <analysisEngineTemplate>... -->
                    <analysisEngineTemplate>ruta/RutaAETemplateDescriptor.xml</analysisEngineTemplate>

                    <!-- Script paths of the generated analysis engine descriptor. -->
                    <!-- default value: none -->
                    <scriptPaths>
                        <scriptPath>/</scriptPath>
                    </scriptPaths>

                    <scriptFiles>
                        <directory>src/main/resources/de/julielab/jcore/ae/speciesassignment/desc</directory>
                        <includes>
                            <include>*.ruta</include>
                        </includes>
                    </scriptFiles>

                    <!-- Descriptor paths of the generated analysis engine descriptor. -->
                    <!-- default value: none -->
                    <descriptorPaths>
                        <descriptorPath>/</descriptorPath>
                    </descriptorPaths>

                    <!-- Resource paths of the generated analysis engine descriptor. -->
                    <!-- default value: none -->
                    <resourcePaths>
                        <resourcePath>resources/ruta</resourcePath>
                    </resourcePaths>

                    <!-- Suffix used for the generated type system descriptors. -->
                    <!-- default value: Engine -->
                    <analysisEngineSuffix>Engine</analysisEngineSuffix>

                    <!-- Suffix used for the generated analysis engine descriptors. -->
                    <!-- default value: TypeSystem -->
                    <typeSystemSuffix>TypeSystem</typeSystemSuffix>

                    <!-- Source file encoding. -->
                    <!-- default value: ${project.build.sourceEncoding} -->
                    <encoding>UTF-8</encoding>

                    <!-- Type of type system imports. false = import by location. -->
                    <!-- default value: false -->
                    <importByName>true</importByName>

                    <!-- Option to resolve imports while building. -->
                    <!-- default value: false -->
                    <resolveImports>false</resolveImports>

                    <!-- Amount of retries for building dependent descriptors. Default value
                     -1 leads to three retires for each script. -->
                    <!-- default value: -1 -->
                    <maxBuildRetries>-1</maxBuildRetries>

                    <!-- List of packages with language extensions -->
                    <!-- default value: none -->
                    <!--                    <extensionPackages>-->
                    <!--                        <extensionPackage>org.apache.uima.ruta</extensionPackage>-->
                    <!--                    </extensionPackages>-->


                    <inputFiles/>
                </configuration>
                <executions>
                    <execution>
                        <id>default</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.8</version>
                <executions>
                    <execution>
                        <id>copy-ruta-descriptors-to-resources</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target name="copy ruta descriptors to resources">
                                <copy file="${project.build.directory}/classes/de/julielab/jcore/ae/speciesassignment/desc/SpeciesCleaningEngine.xml"
                                      tofile="src/main/resources/de/julielab/jcore/ae/speciesassignment/desc/SpeciesCleaningEngine.xml"/>
                                <copy file="${project.build.directory}/classes/de/julielab/jcore/ae/speciesassignment/desc/OrganismEnumerationEngine.xml"
                                      tofile="src/main/resources/de/julielab/jcore/ae/speciesassignment/desc/OrganismEnumerationEngine.xml"/>
                            </target>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.uima</groupId>
                <artifactId>jcasgen-maven-plugin</artifactId>
                <version>${uima-version}</version>  <!-- change this to the latest version -->
                <executions>
                    <execution>
                        <goals>
                            <goal>generate</goal>
                        </goals>  <!-- this is the only goal -->
                        <!-- runs in phase process-resources by default -->
                        <!--                        <phase>process-classes</phase>-->
                        <configuration>

                            <!-- REQUIRED -->
                            <typeSystemIncludes>
                                <!-- one or more ant-like file patterns
                                     identifying top level descriptors -->
                                <typeSystemInclude>
                                    target/classes/de/julielab/jcore/ae/speciesassignment/desc/SpeciesCleaningTypeSystem.xml
                                </typeSystemInclude>
                                <typeSystemInclude>
                                    target/classes/de/julielab/jcore/ae/speciesassignment/desc/OrganismEnumerationTypeSystem.xml
                                </typeSystemInclude>
                            </typeSystemIncludes>

                            <!-- OPTIONAL -->
                            <!-- a sequence of ant-like file patterns
                                 to exclude from the above include list -->
                            <typeSystemExcludes>
                            </typeSystemExcludes>

                            <!-- OPTIONAL -->
                            <!-- where the generated files go -->
                            <!-- default value:
                                 ${project.build.directory}/generated-sources/jcasgen" -->
                            <outputDirectory>
                                src/main/java
                            </outputDirectory>

                            <!-- true or false, default = false -->
                            <!-- if true, then although the complete merged type system
                                 will be created internally, only those types whose
                                 definition is contained within this maven project will be
                                 generated.  The others will be presumed to be
                                 available via other projects. -->
                            <!-- OPTIONAL -->
                            <limitToProject>true</limitToProject>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <description>The task that is the subject of this project is the assignment of taxonomy identifiers to mentions of
        genes
        in text documents. The base for the assignment are mostly the mentions of species in the same document.
    </description>
    <licenses>
        <license>
            <name>BSD-2-Clause</name>
            <url>https://opensource.org/licenses/BSD-2-Clause</url>
        </license>
    </licenses>
    <organization>
        <name>JULIE Lab Jena, Germany</name>
        <url>http://www.julielab.de</url>
    </organization>
    <scm>
        <connection>scm:git:https://github.com/JULIELab/gene-species-assignment</connection>
        <developerConnection>scm:git:https://github.com/JULIELab/gene-species-assignment</developerConnection>
        <url>https://github.com/JULIELab/gene-species-assignment</url>
    </scm>
    <developers>
        <developer>
            <id>faessler</id>
            <name>Erik Faessler</name>
            <email>erik.faessler@uni-jena.de</email>
        </developer>
    </developers>
</project>