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

  <groupId>org.openmicroscopy</groupId>
  <artifactId>ome-common</artifactId>
  <version>6.0.22</version>

  <name>OME Common Java</name>
  <description>Contains common I/O, date parsing, and XML processing classes.</description>
  <url>http://www.openmicroscopy.org/site/products/bio-formats</url>
  <inceptionYear>2005</inceptionYear>
  <organization>
    <name>Open Microscopy Environment</name>
    <url>http://www.openmicroscopy.org/</url>
  </organization>
  <licenses>
    <license>
      <name>Simplified BSD License</name>
      <url>https://opensource.org/licenses/BSD-2-Clause</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>The OME Team</name>
      <email>ome-devel@lists.openmicroscopy.org.uk</email>
    </developer>
  </developers>
  <contributors>
    <contributor><name>Chris Allan</name></contributor>
    <contributor><name>Sébastien Besson</name></contributor>
    <contributor><name>Jean-Marie Burel</name></contributor>
    <contributor><name>Ghislain Bonamy</name></contributor>
    <contributor><name>Mark Carroll</name></contributor>
    <contributor><name>Stéphane Dallongeville</name></contributor>
    <contributor><name>Helen Flynn</name></contributor>
    <contributor><name>David Gault</name></contributor>
    <contributor><name>Mark Hiner</name></contributor>
    <contributor><name>Simone Leo</name></contributor>
    <contributor><name>Roger Leigh</name></contributor>
    <contributor><name>Melissa Linkert</name></contributor>
    <contributor><name>Allison McArton</name></contributor>
    <contributor><name>Josh Moore</name></contributor>
    <contributor><name>Andrew Patterson</name></contributor>
    <contributor><name>Blazej Pindelski</name></contributor>
    <contributor><name>Balaji Ramalingam</name></contributor>
    <contributor><name>Curtis Rueden</name></contributor>
    <contributor><name>Christoph Sommer</name></contributor>
    <contributor><name>Bjoern Thiel</name></contributor>
  </contributors>

  <mailingLists>
    <mailingList>
      <name>OME-users</name>
      <subscribe>http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users/</subscribe>
      <unsubscribe>http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users/</unsubscribe>
      <post>ome-users@lists.openmicroscopy.org.uk</post>
      <archive>http://lists.openmicroscopy.org.uk/pipermail/ome-users/</archive>
    </mailingList>
    <mailingList>
      <name>OME-devel</name>
      <subscribe>http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel/</subscribe>
      <unsubscribe>http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel/</unsubscribe>
      <post>ome-devel@lists.openmicroscopy.org.uk</post>
      <archive>http://lists.openmicroscopy.org.uk/pipermail/ome-devel/</archive>
    </mailingList>
  </mailingLists>

  <scm>
    <connection>scm:git:https://github.com/ome/ome-common-java</connection>
    <developerConnection>scm:git:git@github.com:ome/ome-common-java</developerConnection>
    <tag>HEAD</tag>
    <url>http://github.com/ome/ome-common-java</url>
  </scm>
  <issueManagement>
    <system>Trac</system>
    <url>https://trac.openmicroscopy.org/ome</url>
  </issueManagement>
  <ciManagement>
    <system>Jenkins</system>
    <url>https://ci.openmicroscopy.org/</url>
  </ciManagement>
  <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>io.minio</groupId>
     <artifactId>minio</artifactId>
     <version>5.0.2</version>
     <exclusions>
       <exclusion>
         <groupId>commons-codec</groupId>
         <artifactId>commons-codec</artifactId>
       </exclusion>
       <exclusion>
         <groupId>commons-logging</groupId>
         <artifactId>commons-logging</artifactId>
       </exclusion>
       <exclusion>
         <groupId>com.google.code.findbugs</groupId>
         <artifactId>annotations</artifactId>
       </exclusion>
       <exclusion>
         <groupId>com.google.code.findbugs</groupId>
         <artifactId>jsr305</artifactId>
       </exclusion>
       <exclusion>
         <groupId>com.fasterxml.jackson.core</groupId>
         <artifactId>jackson-databind</artifactId>
       </exclusion>
       <exclusion>
         <groupId>com.fasterxml.jackson.core</groupId>
         <artifactId>jackson-core</artifactId>
       </exclusion>
       <exclusion>
         <groupId>com.fasterxml.jackson.core</groupId>
         <artifactId>jackson-annotations</artifactId>
       </exclusion>
     </exclusions>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>2.14.2</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-annotations</artifactId>
      <version>2.14.2</version>
    </dependency>
    <dependency>
     <groupId>com.esotericsoftware</groupId>
     <artifactId>kryo</artifactId>
     <version>5.4.0</version>
    </dependency>
    <dependency>
      <groupId>joda-time</groupId>
      <artifactId>joda-time</artifactId>
      <version>2.12.2</version>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>32.0.0-jre</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>2.0.9</version>
    </dependency>

    <!-- NB: dependency:analyze has false warning about xml-apis:xml-apis. -->

    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-core</artifactId>
      <version>1.3.14</version>
      <optional>true</optional>
    </dependency>
    <dependency>
      <!-- NB: We want this, despite warning from dependency:analyze. -->
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>1.3.14</version>
      <optional>true</optional>
    </dependency>
    <dependency>
      <!-- NB: We want this, despite warning from dependency:analyze. -->
      <groupId>xalan</groupId>
      <artifactId>serializer</artifactId>
      <version>2.7.2</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <!-- NB: We want this, despite warning from dependency:analyze. -->
      <groupId>xalan</groupId>
      <artifactId>xalan</artifactId>
      <version>2.7.3</version>
      <scope>runtime</scope>
    </dependency>

    <dependency>
      <groupId>org.testng</groupId>
      <artifactId>testng</artifactId>
      <version>${testng.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <properties>
    <!-- NB: Avoid platform encoding warning when copying resources. -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

    <!-- NB: Specify formatting of the maven.build.timestamp property. -->
    <maven.build.timestamp.format>d MMMMM yyyy</maven.build.timestamp.format>

    <!-- NB: Override argLine property for extra maven-surefire-plugin args. -->
    <argLine/>
  </properties>

  <build>
    <!-- It is nice for "mvn" with no arguments to do something reasonable. -->
    <defaultGoal>install</defaultGoal>

    <resources>
      <resource>
        <directory>src/main/java</directory>
        <includes>
          <include>**/*.properties</include>
        </includes>
      </resource>
    </resources>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.7.0</version>
        <!-- Require the Java 8 platform. -->
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>

      <!-- Enable 'license:' goals. -->
      <!-- License Maven plugin -
           http://mojo.codehaus.org/license-maven-plugin/
           This plugin manages project licenses and source file headers. -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <version>1.16</version>
        <configuration>
          <licenseName>bsd_2</licenseName>
          <organizationName>Open Microscopy Environment:
  - Board of Regents of the University of Wisconsin-Madison
  - Glencoe Software, Inc.
  - University of Dundee</organizationName>
          <projectName>Common package for I/O and related utilities</projectName>
          <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
          <canUpdateDescription>true</canUpdateDescription>
          <!-- NB: Avoid stomping on variant copyright holders. -->
          <canUpdateCopyright>false</canUpdateCopyright>
          <roots>
            <root>src</root>
          </roots>
          <extraExtensions>
            <bsh>java</bsh>
            <config>properties</config>
            <ijm>java</ijm>
          </extraExtensions>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.22.0</version>
        <configuration>
          <suiteXmlFiles>
            <suiteXmlFile>src/test/java/loci/common/utests/testng-template.xml</suiteXmlFile>
          </suiteXmlFiles>
          <systemPropertyVariables>
            <testng.runHttpRemoteTests>0</testng.runHttpRemoteTests>
            <testng.runS3RemoteTests>0</testng.runS3RemoteTests>
          </systemPropertyVariables>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>3.1.0</version>
      </plugin>

      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <version>3.1.0</version>
      </plugin>

      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>3.1.1</version>
      </plugin>

      <plugin>
        <artifactId>maven-deploy-plugin</artifactId>
        <version>2.8.2</version>
      </plugin>

      <plugin>
        <artifactId>maven-install-plugin</artifactId>
        <version>2.5.2</version>
      </plugin>

      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.1.0</version>
        <!-- Always add classpath to JAR manifests. -->
        <configuration>
          <skipIfEmpty>true</skipIfEmpty>
          <archive>
            <manifest>
              <addClasspath>true</addClasspath>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
              <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
            </manifest>
            <manifestEntries>
              <!-- Add SCM revision from buildnumber plugin, if available. -->
              <Implementation-Build>${buildNumber}</Implementation-Build>
              <!-- Add a formatted timestamp for the build. -->
              <Implementation-Date>${maven.build.timestamp}</Implementation-Date>
            </manifestEntries>
          </archive>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <!-- NB: The same version declaration and configuration block also
             appears in the <reporting> section, and must be kept in sync. -->
        <version>3.0.1</version>
        <configuration>
          <failOnError>false</failOnError>
          <links>
            <link>http://docs.oracle.com/javase/8/docs/api/</link>
          </links>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <artifactId>maven-plugin-plugin</artifactId>
        <version>3.5.2</version>
      </plugin>

      <plugin>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.5.3</version>
        <dependencies>
          <dependency>
            <groupId>org.apache.maven.scm</groupId>
            <artifactId>maven-scm-provider-gitexe</artifactId>
            <version>1.9</version>
          </dependency>
        </dependencies>
      </plugin>

      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <version>3.1.0</version>
      </plugin>

      <plugin>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.7.1</version>
      </plugin>

      <!-- Create -sources.jar when building. -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.0.1</version>
        <!-- Build source artifact in addition to main artifact. -->
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <!-- Build Number Maven plugin -
           http://mojo.codehaus.org/buildnumber-maven-plugin/
           This plugin embeds a build number in the JAR manifest. -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>buildnumber-maven-plugin</artifactId>
        <version>1.4</version>
        <!-- Record SCM revision in manifest. -->
        <executions>
          <execution>
            <phase>validate</phase>
            <goals>
              <goal>create</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <getRevisionOnlyOnce>true</getRevisionOnlyOnce>
          <revisionOnScmFailure>UNKNOWN</revisionOnScmFailure>
        </configuration>
      </plugin>

      <!-- Versions Maven plugin -
           http://mojo.codehaus.org/versions-maven-plugin/
           Check for new plugin versions using
           "mvn versions:display-plugin-updates" -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>versions-maven-plugin</artifactId>
        <version>2.5</version>
      </plugin>

    </plugins>
  </build>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <!-- Stage releases with nexus -->
          <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>

          <!-- gpg release signing -->
          <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>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>jdk8-only</id>
      <activation>
        <jdk>(,11)</jdk>
      </activation>
      <properties>
        <testng.version>7.5</testng.version>
      </properties>
    </profile>
    <profile>
      <id>jdk11+</id>
      <activation>
        <jdk>[11,)</jdk>
      </activation>
      <properties>
        <testng.version>7.9.0</testng.version>
      </properties>
    </profile>
  </profiles>
</project>
