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

  <groupId>io.github.bigbio.external</groupId>
  <artifactId>pia</artifactId>
  <version>1.3.22</version>
  <name>PIA - Protein Inference Algorithms</name>
  <url>https://github.com/mpc-bioinformatics/pia</url>
  <description>Protein inference toolbox that contains algorithms to merge results from search engines in mass spectrometry and proteomics. It provides functionalities to compute FDR at different levels including PSM, peptide and Protein levels.</description>

  <licenses>
    <license>
      <name>BSD license</name>
      <url>https://raw.githubusercontent.com/bigbio/pia/master/LICENSE</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <organization>
    <url>http://www.ruhr-uni-bochum.de/mpc/medical_bioinformatics</url>
    <name>Medizinisches Proteom-Center, Medical Bioinformatics</name>
  </organization>

  <developers>
    <developer>
      <id>julianu</id>
      <name>Julian Uszkoreit</name>
      <organization>Medizinisches Proteom-Center, Medical Bioinformatics</organization>
      <organizationUrl>http://www.ruhr-uni-bochum.de/mpc/medical_bioinformatics</organizationUrl>
      <roles>
        <role>developer</role>
      </roles>
      <timezone>Europe/Berlin</timezone>
    </developer>
    <developer>
      <id>ypriverol</id>
      <name>Yasset Perez-Riverol</name>
      <organization>EMBL-EBI</organization>
      <organizationUrl>http://bigbio.xyz</organizationUrl>
      <roles>
        <role>developer</role>
      </roles>
      <timezone>Europe/London</timezone>
    </developer>
  </developers>

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

    <junit.version>4.13.1</junit.version>
    <commons-collections.version>4.1</commons-collections.version>
    <jmzidentml.version>1.2.12-SNAPSHOT</jmzidentml.version>
    <jmztab.version>3.0.13</jmztab.version>
    <pride-mod.version>2.1.9</pride-mod.version>
    <xxindex.version>0.23</xxindex.version>
    <mascotdatfile.version>3.6.1</mascotdatfile.version>
    <xtandem-parser.version>1.13.0</xtandem-parser.version>
    <biojava-ontology.version>4.2.8</biojava-ontology.version>
    <sqlite4java.version>1.0.392</sqlite4java.version>
    <sqlite-jdbc.version>3.20.1</sqlite-jdbc.version>
    <ehcache.version>3.1.1</ehcache.version>
    <xercesImpl.version>2.12.1</xercesImpl.version>
    <gson.version>2.8.1</gson.version>
    <picocli.version>4.6.1</picocli.version>

    <!-- these are "internal" dependencies, the jar files are delivered together with the source -->
    <BaseLib.version>0.0.1-SNAPSHOT</BaseLib.version>
    <CvtBaseLib.version>0.0.1-SNAPSHOT</CvtBaseLib.version>
    <PDLibrary.version>0.0.1-SNAPSHOT</PDLibrary.version>

    <!-- check for these dependencies the available KNIME deps. If these are ok, take them, even if they are older. -->
    <commons-lang3.version>3.2.1</commons-lang3.version>
    <px.submission.core.version>2.0.30</px.submission.core.version>
    <lombock.version>1.18.2</lombock.version>
  </properties>

  <dependencies>

    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <version>${lombock.version}</version>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>info.picocli</groupId>
      <artifactId>picocli</artifactId>
      <version>${picocli.version}</version>
    </dependency>

    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
      <version>${commons-lang3.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-collections4</artifactId>
      <version>${commons-collections.version}</version>
    </dependency>

    <dependency>
      <groupId>uk.ac.ebi.jmzidml</groupId>
      <artifactId>jmzidentml</artifactId>
      <version>${jmzidentml.version}</version>
    </dependency>

    <!-- JAXB needs to be added for Java >= 9 -->
    <dependency>
      <groupId>javax.xml.bind</groupId>
      <artifactId>jaxb-api</artifactId>
      <version>2.3.1</version>
    </dependency>

    <dependency>
      <groupId>com.sun.xml.bind</groupId>
      <artifactId>jaxb-impl</artifactId>
      <version>2.3.1</version>
    </dependency>

    <dependency>
      <groupId>com.sun.xml.bind</groupId>
      <artifactId>jaxb-core</artifactId>
      <version>2.3.0</version>
    </dependency>
    <!-- JAXB additions -->

    <!-- pride mod dependency -->
    <dependency>
      <groupId>uk.ac.ebi.pride.utilities</groupId>
      <artifactId>pride-mod</artifactId>
      <version>${pride-mod.version}</version>
    </dependency>
    <!-- End pride mod dependency -->

    <!-- mzTab dependencies -->
    <dependency>
      <groupId>io.github.bigbio.external</groupId>
      <artifactId>jmztab</artifactId>
      <version>${jmztab.version}</version>
      <exclusions>
        <exclusion>
          <groupId>uk.ac.ebi.pride</groupId>
          <artifactId>px-submission-core</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <!-- End mzTab dependencies-->

    <dependency>
      <groupId>uk.ac.ebi.pride</groupId>
      <artifactId>px-submission-core</artifactId>
      <version>${px.submission.core.version}</version>
    </dependency>

    <dependency>
      <groupId>com.google.code.gson</groupId>
      <artifactId>gson</artifactId>
      <version>${gson.version}</version>
    </dependency>

    <!-- mascotdatfile wants to use a very old version, use newer instead -->
    <dependency>
      <groupId>psidev.psi.tools</groupId>
      <artifactId>xxindex</artifactId>
      <version>${xxindex.version}</version>
    </dependency>

    <dependency>
      <groupId>com.compomics</groupId>
      <artifactId>mascotdatfile</artifactId>
      <version>${mascotdatfile.version}</version>
    </dependency>
    <dependency>
      <groupId>de.proteinms.xtandemparser</groupId>
      <artifactId>xtandem-parser</artifactId>
      <version>${xtandem-parser.version}</version>
    </dependency>
    <dependency>
      <groupId>org.biojava</groupId>
      <artifactId>biojava-ontology</artifactId>
      <version>${biojava-ontology.version}</version>
      <exclusions>
        <exclusion>
          <groupId>org.apache.logging.log4j</groupId>
          <artifactId>log4j-core</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <!-- shipped MPC libraries -->
    <dependency>
      <groupId>de.mpc</groupId>
      <artifactId>BaseLib</artifactId>
      <version>${BaseLib.version}</version>
    </dependency>
    <dependency>
      <groupId>de.mpc</groupId>
      <artifactId>CvtBaseLib</artifactId>
      <version>${CvtBaseLib.version}</version>
    </dependency>
    <dependency>
      <groupId>de.mpc</groupId>
      <artifactId>PDLibrary</artifactId>
      <version>${PDLibrary.version}</version>
    </dependency>
    <!-- End shipped MPC libraries -->

    <!-- SQlite support for MSF files -->
    <dependency>
      <groupId>com.almworks.sqlite4java</groupId>
      <artifactId>sqlite4java</artifactId>
      <version>${sqlite4java.version}</version>
    </dependency>
    <dependency>
      <groupId>org.xerial</groupId>
      <artifactId>sqlite-jdbc</artifactId>
      <version>${sqlite-jdbc.version}</version>
    </dependency>
    <!-- End SQlite support for MSF files -->

    <dependency>
      <groupId>org.ehcache</groupId>
      <artifactId>ehcache</artifactId>
      <version>${ehcache.version}</version>
    </dependency>

    <!--  needed by some testcases and testscenarios -->
    <dependency>
      <groupId>xerces</groupId>
      <artifactId>xercesImpl</artifactId>
      <version>${xercesImpl.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.compomics</groupId>
      <artifactId>utilities</artifactId>
      <version>5.0.18</version>
    </dependency>

  </dependencies>

  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
      </resource>
    </resources>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.1</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.1.2</version>
        <configuration>
          <excludes>
            <exclude>src/test</exclude>
            <exclude>src/test/*.class</exclude>
          </excludes>
          <archive>
            <index>true</index>
            <manifest>
              <!-- Adds the classpath to the created manifest -->
              <addClasspath>true</addClasspath>
              <classpathPrefix>lib/</classpathPrefix>
              <!-- Configures the main class of the application -->
              <mainClass>de.mpc.pia.modeller.PIAModeller</mainClass>
            </manifest>
          </archive>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>3.1.1</version>
        <configuration>
          <appendAssemblyId>false</appendAssemblyId>
          <descriptors>
            <descriptor>${project.basedir}/assembly.xml</descriptor>
          </descriptors>
        </configuration>
        <executions>
          <execution>
            <id>assembly</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.0.0</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.1.1</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <additionalOptions>
            <additionalOption>-Xdoclint:none</additionalOption>
          </additionalOptions>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>3.0.1</version>
        <configuration>
          <!-- Prevent `gpg` from using pinentry programs -->
          <gpgArguments>
            <arg>--pinentry-mode</arg>
            <arg>loopback</arg>
          </gpgArguments>
        </configuration>
        <executions>
          <execution>
            <id>sign-artifacts</id>
            <phase>verify</phase>
            <goals>
              <goal>sign</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <!-- Nexus Staging Plugin -->
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>1.6.8</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>ossrh</serverId>
          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
          <autoReleaseAfterClose>false</autoReleaseAfterClose>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <repositories>
    <!-- EBI repo -->
    <repository>
      <id>pst-release</id>
      <name>EBI Nexus Repository</name>
      <url>https://www.ebi.ac.uk/Tools/maven/repos/content/repositories/pst-release</url>
    </repository>
    <!-- EBI SNAPSHOT repo -->
    <repository>
      <id>pst-snapshots</id>
      <name>EBI Nexus Snapshots Repository</name>
      <url>https://www.ebi.ac.uk/Tools/maven/repos/content/repositories/pst-snapshots</url>
    </repository>
    <repository>
      <id>sonatype-release</id>
      <name>Central Repository OSSRH</name>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
    </repository>
    <repository>
      <id>sonatype-snapshopt</id>
      <name>Central Repository OSSRH</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </repository>
  </repositories>
  <distributionManagement>
    <repository>
      <id>sonatype-release</id>
      <name>Central Repository OSSRH</name>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
    </repository>
    <snapshotRepository>
      <id>sonatype-snapshopt</id>
      <name>Central Repository OSSRH</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>

  <!--scm git config-->
  <scm>
    <connection>scm:git:https://github.com/bigbio/pia.git</connection>
    <developerConnection>scm:git:https://github.com/bigbio/pia.git</developerConnection>
    <url>https://github.com/bigbio/pia.git</url>
    <tag>HEAD</tag>
  </scm>

</project>
