<?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>
    <properties>
        <!--for packaging jdk included version-->
        <!--<java.path>jdk1.8/bin/java</java.path>-->
        <!--<java.win.path>jdk1.8\bin\java</java.win.path>-->
        <!--for packaging without jdk version-->
        <java.path>java</java.path>
        <java.win.path>java</java.win.path>
        <current.version>3.0.1</current.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <nlp.core.version>1.3.1.9</nlp.core.version>
        <kotlin.version>1.3.21</kotlin.version>
    </properties>
    <groupId>edu.utah.bmi.nlp</groupId>
    <artifactId>easycie-gui</artifactId>
    <version>${current.version}</version>
    <name>EasyCIE Project</name>
    <url>https://github.com/jianlins/EasyCIE_GUI</url>
    <description>The library of EasyCIE.</description>
    <scm>
        <connection>https://github.com/jianlins/EasyCIE_GUI.git</connection>
        <url>scm:git:git@github.com:jianlins/EasyCIE_GUI.git</url>
        <developerConnection>scm:git:git@github.com:jianlins/EasyCIE_GUI.git</developerConnection>
    </scm>
    <licenses>
        <license>
            <name>The Apache Software License, Version 2</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
        </license>
    </licenses>
    <organization>
        <name>The Department of Biomedical Informatics, University of Utah</name>
        <url>bmi.utah.edu</url>
    </organization>
    <developers>
        <developer>
            <name>Jianlin Shi</name>
            <email>jianlinshi.cn@gmail.com</email>
            <organization>The Department of Biomedical Informatics, University of Utah</organization>
            <organizationUrl>bmi.utah.edu</organizationUrl>
        </developer>
    </developers>
    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>
    <dependencies>
        <dependency>
            <groupId>dom4j</groupId>
            <artifactId>dom4j</artifactId>
            <version>1.6.1</version>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>6.0.5</version>
        </dependency>
        <dependency>
            <groupId>jaxen</groupId>
            <artifactId>jaxen</artifactId>
            <version>1.1.6</version>
        </dependency>
        <dependency>
            <groupId>edu.utah.bmi.nlp</groupId>
            <artifactId>nlp-core</artifactId>
            <version>${nlp.core.version}</version>
        </dependency>
        <dependency>
            <groupId>edu.utah.bmi.nlp</groupId>
            <artifactId>rush</artifactId>
            <version>${nlp.core.version}</version>
        </dependency>
        <dependency>
            <groupId>edu.utah.bmi.nlp</groupId>
            <artifactId>fastner</artifactId>
            <version>${nlp.core.version}</version>
        </dependency>
        <dependency>
            <groupId>edu.utah.bmi.nlp</groupId>
            <artifactId>fastcontext</artifactId>
            <version>${nlp.core.version}</version>
        </dependency>
        <dependency>
            <groupId>edu.utah.bmi.nlp</groupId>
            <artifactId>section-detector-r</artifactId>
            <version>${nlp.core.version}</version>
        </dependency>
        <!--<dependency>-->
            <!--<groupId>edu.utah.bmi.blulab</groupId>-->
            <!--<artifactId>domainontology</artifactId>-->
            <!--<version>2016.12.2-SNAPSHOT</version>-->
        <!--</dependency>-->
        <dependency>
            <groupId>commons-cli</groupId>
            <artifactId>commons-cli</artifactId>
            <version>1.4</version>
        </dependency>
        <dependency>
            <groupId>org.apache.opennlp</groupId>
            <artifactId>opennlp-tools</artifactId>
            <version>1.8.4</version>
        </dependency>

        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-tools-ant</artifactId>
            <version>3.5.1</version>
        </dependency>
        <dependency>
            <groupId>org.xerial</groupId>
            <artifactId>sqlite-jdbc</artifactId>
            <version>3.21.0.1</version>
        </dependency>
        <dependency>
            <groupId>ch.vorburger.mariaDB4j</groupId>
            <artifactId>mariaDB4j-core</artifactId>
            <version>2.2.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-stdlib</artifactId>
            <version>${kotlin.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-test-junit</artifactId>
            <version>${kotlin.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <version>2.9.7</version>
        </dependency>
        <dependency>
            <groupId>edu.utah.bmi.pojava</groupId>
            <artifactId>pojava</artifactId>
            <version>3.0.8</version>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.19.1</version>
                <configuration>
                    <skipTests>true</skipTests>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.4</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <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>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/deploy/lib</outputDirectory>
                            <overWriteReleases>false</overWriteReleases>
                            <overWriteSnapshots>false</overWriteSnapshots>
                            <overWriteIfNewer>true</overWriteIfNewer>
                            <excludeGroupIds>org.apache.maven.plugins</excludeGroupIds>
                            <excludeGroupIds>junit</excludeGroupIds>
                            <excludeGroupIds>org.apache.maven</excludeGroupIds>
                            <excludeGroupIds>ch.vorburger.mariaDB4j</excludeGroupIds>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.3.1</version>
                <configuration>
                    <outputDirectory>${project.build.directory}/deploy/lib</outputDirectory>
                </configuration>
            </plugin>
            <!--<plugin>-->
                <!--<artifactId>maven-assembly-plugin</artifactId>-->
                <!--<version>3.0.0</version>-->
                <!--<executions>-->
                    <!--<execution>-->
                        <!--<phase>package</phase>-->
                        <!--<goals>-->
                            <!--<goal>single</goal>-->
                        <!--</goals>-->
                    <!--</execution>-->
                <!--</executions>-->
                <!--<configuration>-->
                    <!--<descriptorRefs>-->
                        <!--<descriptorRef>jar-with-dependencies</descriptorRef>-->
                    <!--</descriptorRefs>-->
                    <!--<outputDirectory>${project.build.directory}/deploy/lib</outputDirectory>-->
                <!--</configuration>-->
            <!--</plugin>-->
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.0.1</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                </configuration>
                <executions>
                    <execution>
                        <id>copy-conf</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/deploy/conf</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>conf</directory>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-script</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/deploy</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>script</directory>
                                    <filtering>true</filtering>
                                    <excludes>
                                        <exclude>run.*</exclude>
                                        <exclude>help.*</exclude>
                                        <exclude>run</exclude>
                                        <exclude>help</exclude>
                                        <exclude>*.xml</exclude>
                                        <exclude>zipper.sh</exclude>
                                    </excludes>
                                </resource>
                            </resources>
                            <nonFilteredFileExtensions>
                                <nonFilteredFileExtension>docx</nonFilteredFileExtension>
                            </nonFilteredFileExtensions>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-desc</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/deploy/desc</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>desc</directory>
                                    <excludes>
                                        <exclude>**/customized*.xml</exclude>
                                        <exclude>**/pipeline_*.xml</exclude>
                                    </excludes>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                    <!--<execution>-->
                        <!--<id>copy-input-data</id>-->
                        <!--<phase>package</phase>-->
                        <!--<goals>-->
                            <!--<goal>copy-resources</goal>-->
                        <!--</goals>-->
                        <!--<configuration>-->
                            <!--<outputDirectory>${project.build.directory}/deploy/data/input</outputDirectory>-->
                            <!--<resources>-->
                                <!--<resource>-->
                                    <!--<directory>data/input</directory>-->
                                <!--</resource>-->
                            <!--</resources>-->
                        <!--</configuration>-->
                    <!--</execution>-->
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.6</version>
                <executions>
                    <execution>
                        <id>reset_permission</id>
                        <phase>package</phase>
                        <configuration>
                            <target>
                                <chmod file="target/deploy/run_gui" perm="755"/>
                                <chmod file="target/deploy/run_gui.bat" perm="755"/>
                                <mkdir dir="target/deploy/data"/>
                            </target>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.zenjava</groupId>
                <artifactId>javafx-maven-plugin</artifactId>
                <version>8.6.0</version>
                <configuration>
                    <mainClass>edu.utah.bmi.simple.gui.controller.Main</mainClass>
                </configuration>
            </plugin>
            <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>
                    </execution>
                    <execution>
                        <id>test-compile</id>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>test-compile</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <jvmTarget>1.8</jvmTarget>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <executions>
                    <execution>
                        <id>compile</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>testCompile</id>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>allow-snapshots</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <repositories>
                <repository>
                    <id>snapshots-repo</id>
                    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
                    <releases>
                        <enabled>false</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </repository>
            </repositories>
        </profile>
    </profiles>
</project>
