<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>

  <artifactId>phenol-io</artifactId>
  <packaging>jar</packaging>

  <name>phenol-io</name>

  <description>phenol-io contains the generic I/O functionality for ontologies</description>
  <url>https://github.com/monarchinitiative/phenol</url>

  <parent>
    <groupId>org.monarchinitiative.phenol</groupId>
    <artifactId>phenol</artifactId>
    <version>1.3.2</version>
  </parent>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <dependencies>
    <!-- Phenol core -->
    <dependency>
      <groupId>org.monarchinitiative.phenol</groupId>
      <artifactId>phenol-core</artifactId>
      <version>${project.parent.version}</version>
      <exclusions>
         <exclusion>
             <groupId>com.beust</groupId>
             <artifactId>jcommander</artifactId>
         </exclusion>
         <exclusion>
             <groupId>com.google.guava</groupId>
             <artifactId>guava</artifactId>
         </exclusion>
         <exclusion>
              <groupId>org.slf4j</groupId>
              <artifactId>slf4j-api</artifactId>
          </exclusion>
          <exclusion>
              <groupId>org.slf4j</groupId>
              <artifactId>slf4j-jdk14</artifactId>
          </exclusion>
          <exclusion>
              <groupId>org.openrdf.sesame</groupId>
              <artifactId>sesame-model</artifactId>
          </exclusion>
          <exclusion>
              <groupId>commons-io</groupId>
              <artifactId>commons-io</artifactId>
          </exclusion>
          <exclusion>
              <groupId>com.google.code.findbugs</groupId>
              <artifactId>jsr305</artifactId>
          </exclusion>
      </exclusions>
    </dependency>

    <!-- Apache Commons I/O for testing -->
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>${commons.io.version}</version>
    </dependency>

    <dependency>
       <groupId>org.geneontology</groupId>
       <artifactId>obographs</artifactId>
       <version>0.1.1</version>
       <exclusions>
          <exclusion>
              <groupId>com.fasterxml.jackson.core</groupId>
              <artifactId>jackson-databind</artifactId>
          </exclusion>
          <exclusion>
              <groupId>com.fasterxml.jackson.core</groupId>
              <artifactId>jackson-annotations</artifactId>
          </exclusion>
          <exclusion>
              <groupId>com.fasterxml.jackson.core</groupId>
              <artifactId>jackson-core</artifactId>
          </exclusion>
          <exclusion>
              <groupId>com.github.jsonld-java</groupId>
              <artifactId>jsonld-java</artifactId>
          </exclusion>
          <exclusion>
              <groupId>org.yaml</groupId>
              <artifactId>snakeyaml</artifactId>
          </exclusion>
          <exclusion>
              <groupId>org.openrdf.sesame</groupId>
              <artifactId>sesame-rio-api</artifactId>
          </exclusion>
          <exclusion>
              <groupId>org.semarglproject</groupId>
              <artifactId>semargl-sesame</artifactId>
          </exclusion>
          <exclusion>
              <groupId>com.google.guava</groupId>
              <artifactId>guava</artifactId>
          </exclusion>
          <exclusion>
              <groupId>org.slf4j</groupId>
              <artifactId>slf4j-api</artifactId>
          </exclusion>
          <exclusion>
              <groupId>org.openrdf.sesame</groupId>
              <artifactId>sesame-model</artifactId>
          </exclusion>
          <exclusion>
              <groupId>commons-io</groupId>
              <artifactId>commons-io</artifactId>
          </exclusion>
          <exclusion>
              <groupId>com.google.code.findbugs</groupId>
              <artifactId>jsr305</artifactId>
          </exclusion>
         <exclusion>
             <groupId>com.beust</groupId>
             <artifactId>jcommander</artifactId>
         </exclusion>
         <exclusion>
             <groupId>net.sourceforge.owlapi</groupId>
             <artifactId>owlapi-distribution</artifactId>
         </exclusion>
       </exclusions>
    </dependency>

    <dependency>
       <groupId>org.prefixcommons</groupId>
       <artifactId>curie-util</artifactId>
       <version>0.0.2</version>
       <exclusions>
          <exclusion>
              <groupId>com.google.guava</groupId>
              <artifactId>guava</artifactId>
          </exclusion>
          <exclusion>
              <groupId>com.github.jsonld-java</groupId>
              <artifactId>jsonld-java</artifactId>
          </exclusion>
          <exclusion>
              <groupId>org.openrdf.sesame</groupId>
              <artifactId>sesame-rio-api</artifactId>
          </exclusion>
       </exclusions>
    </dependency>

    <dependency>
        <groupId>org.yaml</groupId>
        <artifactId>snakeyaml</artifactId>
        <version>1.19</version>
     </dependency>

    <dependency>
        <groupId>net.sourceforge.owlapi</groupId>
        <artifactId>owlapi-distribution</artifactId>
        <version>4.5.6</version>
        <exclusions>
          <exclusion>
              <groupId>org.openrdf.sesame</groupId>
              <artifactId>sesame-rio-api</artifactId>
          </exclusion>
          <exclusion>
              <groupId>org.semarglproject</groupId>
              <artifactId>semargl-sesame</artifactId>
          </exclusion>
          <exclusion>
              <groupId>org.openrdf.sesame</groupId>
              <artifactId>sesame-model</artifactId>
          </exclusion>
          <exclusion>
              <groupId>com.fasterxml.jackson.core</groupId>
              <artifactId>jackson-databind</artifactId>
          </exclusion>
          <exclusion>
              <groupId>com.fasterxml.jackson.core</groupId>
              <artifactId>jackson-annotations</artifactId>
          </exclusion>
          <exclusion>
              <groupId>com.fasterxml.jackson.core</groupId>
              <artifactId>jackson-core</artifactId>
          </exclusion>
          <exclusion>
              <groupId>com.github.jsonld-java</groupId>
              <artifactId>jsonld-java</artifactId>
          </exclusion>
          <exclusion>
              <groupId>com.google.guava</groupId>
              <artifactId>guava</artifactId>
          </exclusion>
          <exclusion>
              <groupId>org.slf4j</groupId>
              <artifactId>slf4j-api</artifactId>
          </exclusion>
          <exclusion>
              <groupId>org.slf4j</groupId>
              <artifactId>jcl-over-slf4j</artifactId>
          </exclusion>
          <exclusion>
              <groupId>commons-io</groupId>
              <artifactId>commons-io</artifactId>
          </exclusion>
          <exclusion>
              <groupId>com.google.code.findbugs</groupId>
              <artifactId>jsr305</artifactId>
          </exclusion>
        </exclusions>
    </dependency>

    <dependency>
        <groupId>org.openrdf.sesame</groupId>
        <artifactId>sesame-model</artifactId>
        <version>2.7.16</version>
        <exclusions>
            <exclusion>
              <groupId>org.slf4j</groupId>
              <artifactId>slf4j-api</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

    <dependency>
        <groupId>org.openrdf.sesame</groupId>
        <artifactId>sesame-rio-api</artifactId>
        <version>2.7.16</version>
        <exclusions>
            <exclusion>
              <groupId>org.slf4j</groupId>
              <artifactId>slf4j-jdk14</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

    <dependency>
        <groupId>com.github.jsonld-java</groupId>
        <artifactId>jsonld-java</artifactId>
        <version>0.5.0</version>
        <exclusions>
            <exclusion>
              <groupId>org.slf4j</groupId>
              <artifactId>slf4j-api</artifactId>
            </exclusion>
          <exclusion>
            <groupId>org.slf4</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
          </exclusion>
        </exclusions>
    </dependency>
  </dependencies>

  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <!--Use filtering so that maven will replace placeholders with values
          from the pom e.g. ${project.version} -->
        <filtering>true</filtering>
      </resource>
    </resources>

    <plugins>
      <!-- Helps finding generated sources from Antlr4 -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>3.0.0</version>
        <executions>
          <execution>
            <id>add-source</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>${project.build.directory}/generated-sources/antlr4/</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <!-- Specify the dependencies to copy -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>2.8</version>
        <executions>
          <execution>
            <id>copy-dependencies</id>
            <phase>package</phase>
            <goals>
              <goal>copy-dependencies</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.directory}/lib</outputDirectory>
              <overWriteReleases>false</overWriteReleases>
              <overWriteSnapshots>false</overWriteSnapshots>
              <overWriteIfNewer>true</overWriteIfNewer>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <!-- Specify the resources which need to be made accessible to the
        user -->
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <version>2.6</version>
        <executions>
          <execution>
            <id>copy-resources</id>
            <phase>validate</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.directory}/resources</outputDirectory>
              <resources>
                <resource>
                  <directory>src/main/resources</directory>
                  <!--Use filtering so that maven will replace placeholders
                    with values from the pom e.g. ${project.version} -->
                  <filtering>true</filtering>
                  <includes>
                    <include>application.properties</include>
                    <include>example.settings</include>
                    <include>test.settings</include>
                    <include>log4j2.xml</include>
                  </includes>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
