<?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>metakit</artifactId>
  <version>5.3.0</version>

  <name>Metakit</name>
  <description>A library for reading Metakit database files.</description>
  <url>http://www.openmicroscopy.org/site/products/bio-formats</url>
  <inceptionYear>2005</inceptionYear>

  <licenses>
    <license>
      <name>GNU General Public License v2+</name>
      <url>http://www.gnu.org/licenses/gpl-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

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

    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-core</artifactId>
      <version>${logback.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>${logback.version}</version>
    </dependency>
  </dependencies>

  <properties>
    <!-- If two artifacts on the classpath use two different versions of the
         same dependency, behavior is inconsistent at best, and often broken.
         The following properties facilitate consistency of dependency
         versions between various projects in the SciJava software stack.
         When possible, we advise using the relevant groupId and version
         properties for your dependencies rather than hardcoding them. -->

    <logback.version>1.1.1</logback.version>
    <testng.version>6.8</testng.version>
    <ome-common.version>5.3.1</ome-common.version>

    <!-- 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.5.1</version>
        <!-- Require the Java 7 platform. -->
        <configuration>
          <source>1.7</source>
          <target>1.7</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.9</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.19.1</version>
        <configuration>
          <suiteXmlFiles>
            <suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
          </suiteXmlFiles>
        </configuration>
      </plugin>

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

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

      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>2.10</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.0.2</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>2.10.4</version>
        <configuration>
          <failOnError>false</failOnError>
          <links>
            <link>http://docs.oracle.com/javase/7/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</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.0.1</version>
      </plugin>

      <plugin>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.5.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.3</version>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>doclint-java8-disable</id>
      <activation>
        <jdk>[1.8,)</jdk>
      </activation>

      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.9.1</version>
            <configuration>
              <additionalparam>-Xdoclint:none</additionalparam>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <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.7</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.5</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <reporting>
    <plugins>
      <!-- Generate javadocs as part of site generation. -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.9.1</version>
        <configuration>
          <failOnError>false</failOnError>
          <links>
            <link>http://docs.oracle.com/javase/7/docs/api/</link>
          </links>
        </configuration>
      </plugin>
    </plugins>
  </reporting>

  <prerequisites>
    <maven>3.0</maven>
  </prerequisites>

  <organization>
    <name>Open Microscopy Environment</name>
    <url>http://www.openmicroscopy.org/</url>
  </organization>

  <issueManagement>
    <system>Trac</system>
    <url>https://trac.openmicroscopy.org/ome</url>
  </issueManagement>

  <ciManagement>
    <system>Jenkins</system>
    <url>https://ci.openmicroscopy.org/</url>
  </ciManagement>

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

  <pluginRepositories>
    <pluginRepository>
      <id>central</id>
      <name>Central Repository</name>
      <url>http://repo.maven.apache.org/maven2</url>
      <layout>default</layout>
    </pluginRepository>
  </pluginRepositories>

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

  <developers>
    <developer>
      <id>hinerm</id>
      <name>Mark Hiner</name>
      <email>hinerm@gmail.edu</email>
      <url>http://developer.imagej.net/users/hinerm</url>
      <organization>UW-Madison LOCI</organization>
      <organizationUrl>http://loci.wisc.edu/</organizationUrl>
      <roles>
        <role>architect</role>
        <role>developer</role>
      </roles>
      <timezone>-6</timezone>
      <properties>
        <picUrl>http://developer.imagej.net/files/imagej/profile-pictures/Mark.jpg?1305649677</picUrl>
      </properties>
    </developer>
    <developer>
      <id>melissa</id>
      <name>Melissa Linkert</name>
      <email>melissa@glencoesoftware.com</email>
      <url>http://openmicroscopy.org/site/about/development-teams/glencoe-software</url>
      <organization>Glencoe Software</organization>
      <organizationUrl>http://glencoesoftware.com/</organizationUrl>
      <roles>
        <role>architect</role>
        <role>developer</role>
      </roles>
      <timezone>-6</timezone>
      <properties>
        <picUrl>http://openmicroscopy.org/site/about/development-teams/glencoe-software/melissalinkert.png</picUrl>
      </properties>
    </developer>
    <developer>
      <id>curtis</id>
      <name>Curtis Rueden</name>
      <email>ctrueden@wisc.edu</email>
      <url>http://loci.wisc.edu/people/curtis-rueden</url>
      <organization>UW-Madison LOCI</organization>
      <organizationUrl>http://loci.wisc.edu/</organizationUrl>
      <roles>
        <role>architect</role>
        <role>developer</role>
      </roles>
      <timezone>-6</timezone>
      <properties>
        <picUrl>http://loci.wisc.edu/files/loci/images/people/curtis-2010.jpg</picUrl>
      </properties>
    </developer>
  </developers>

</project>
