<?xml version="1.0" encoding="UTF-8"?>

<!--
  ~ Copyright (c) 2016 Dmitry Avtonomov
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~    http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <!-- ======================================================= -->
    <!-- Artifact Coordinates -->
    <!-- ======================================================= -->

    <parent>
        <groupId>com.github.chhh</groupId>
        <artifactId>sonatype-ossrh-parent</artifactId>
        <version>0.1</version>
        <!--<relativePath>../../sonatype-ossrh</relativePath>-->
    </parent>

    <!--<groupId>com.github.chhh</groupId>-->
    <artifactId>msftbx</artifactId>
    <version>1.8.2</version>
    <packaging>jar</packaging>

    <name>MSFTBX</name>
    <description>MSFTBX - Mass Spectrometry File Tool Box</description>
    <url>https://github.com/chhh/msftbx</url>


    <scm>
        <connection>${scm.url}</connection>
        <developerConnection>${scm.url}</developerConnection>
        <url>${scm.url}</url>
        <tag>v1.8.2</tag>
    </scm>


    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <scm.url>scm:git:https://github.com/chhh/msftbx.git</scm.url>
    </properties>


    <developers>
        <developer>
            <id>chhh</id>
            <name>Dmitry Avtonomov</name>
            <url>https://github.com/chhh/</url>
            <roles>
                <role>author</role>
                <role>maintainer</role>
            </roles>
        </developer>
    </developers>


    <!-- ======================================================= -->
    <!-- Dependencies -->
    <!-- ======================================================= -->
    <dependencies>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.25</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>1.7.25</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>22.0-android</version>
            <exclusions>
                <exclusion>
                    <artifactId>animal-sniffer-annotations</artifactId>
                    <groupId>org.codehaus.mojo</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>j2objc-annotations</artifactId>
                    <groupId>com.google.j2objc</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>error_prone_annotations</artifactId>
                    <groupId>com.google.errorprone</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jsr305</artifactId>
                    <groupId>com.google.code.findbugs</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-pool2</artifactId>
            <version>2.4.2</version>
        </dependency>
        <dependency>
            <groupId>com.github.chhh</groupId>
            <artifactId>javolution-core-java-msftbx</artifactId>
            <version>6.11.7</version>
        </dependency>
        <dependency>
            <groupId>org.biojava</groupId>
            <artifactId>biojava-ontology</artifactId>
            <version>4.2.7</version>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.logging.log4j</groupId>
                    <artifactId>log4j-slf4j-impl</artifactId>
                </exclusion>
                <exclusion>
                    <artifactId>log4j-core</artifactId>
                    <groupId>org.apache.logging.log4j</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>log4j-api</artifactId>
                    <groupId>org.apache.logging.log4j</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
            <!--Note that there is version 2.3.0 available, but proguard complains that it was compiled with a newer
            version of Java. So we're sticking to 2.2.8 so far.-->
            <version>2.2.8</version>
        </dependency>
        <dependency> <!-- for experimental Thermo RAW support -->
            <groupId>org.jvnet.com4j</groupId>
            <artifactId>com4j</artifactId>
            <version>2.1</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-model</artifactId>
            <version>3.5.2</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <sourceDirectory>src</sourceDirectory>
        <testSourceDirectory>test</testSourceDirectory>
        <testResources>
            <testResource>
                <directory>test/resources</directory>
            </testResource>
        </testResources>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.6.1</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.4</version>
                <configuration>
                    <excludePackageNames>javax.*,*.internal,*.jaxb,*.com4j</excludePackageNames>
                    <failOnError>false</failOnError>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.0.2</version>
            </plugin>

            <!-- ======================================================= -->
            <!-- Source code packaging (for IDE) -->
            <!-- ======================================================= -->
            <plugin>
                <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>


            <!-- ======================================================= -->
            <!-- Building a complete jar -->
            <!-- ======================================================= -->
            <!--Build with all dependencies extracted to the target jar -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <descriptorRefs>
                        <descriptorRef>bin</descriptorRef>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                    <archive>
                        <manifest>
                            <mainClass>umich.ms.fileio.filetypes.mzml.MZMLFile</mainClass>
                        </manifest>
                    </archive>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id> <!-- this is used for inheritance merges -->
                        <phase>package</phase> <!-- bind to the packaging phase -->
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!--Build with all dependencies (except Test) copied to ./lib folder -->
            <!--<plugin>-->
                <!--<groupId>org.apache.maven.plugins</groupId>-->
                <!--<artifactId>maven-dependency-plugin</artifactId>-->
                <!--<version>2.5.1</version>-->
                <!--<executions>-->
                    <!--<execution>-->
                        <!--<id>copy-dependencies</id>-->
                        <!--<phase>package</phase>-->
                        <!--<goals>-->
                            <!--<goal>copy-dependencies</goal>-->
                        <!--</goals>-->
                        <!--<configuration>-->
                            <!--<includeScope>runtime</includeScope>-->
                            <!--<outputDirectory>${project.build.directory}/lib/</outputDirectory>-->
                        <!--</configuration>-->
                    <!--</execution>-->
                <!--</executions>-->
            <!--</plugin>-->
            <!--<plugin>-->
                <!--<groupId>org.apache.maven.plugins</groupId>-->
                <!--<artifactId>maven-jar-plugin</artifactId>-->
                <!--<configuration>-->
                    <!--<archive>-->
                        <!--<manifest>-->
                            <!--<addClasspath>true</addClasspath>-->
                            <!--<classpathPrefix>lib/</classpathPrefix>-->
                            <!--&lt;!&ndash;<mainClass>foo.bar.MainClass</mainClass>&ndash;&gt;-->
                        <!--</manifest>-->
                    <!--</archive>-->
                <!--</configuration>-->
            <!--</plugin>-->

        </plugins>

        <!-- ======================================================= -->
        <!-- Resources -->
        <!-- ======================================================= -->
        <resources>
            <resource>
                <directory>src</directory>
                <excludes>
                    <exclude>**/*.java</exclude>
                </excludes>
                <includes>
                    <include>**/*.properties</include>
                    <include>**/*.obo</include>
                </includes>
            </resource>
        </resources>

    </build>
</project>
