<?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-codecs</artifactId>
  <version>0.3.2</version>

  <name>OME Codecs</name>
  <description>Image encoding and decoding routines.</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>Aaron Avery</name></contributor>
    <contributor><name>Sébastien Besson</name></contributor>
    <contributor><name>Jean-Marie Burel</name></contributor>
    <contributor><name>Mark Carroll</name></contributor>
    <contributor><name>David Gault</name></contributor>
    <contributor><name>Simone Leo</name></contributor>
    <contributor><name>Roger Leigh</name></contributor>
    <contributor><name>Melissa Linkert</name></contributor>
    <contributor><name>Blazej Pindelski</name></contributor>
    <contributor><name>Curtis Rueden</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>

  <prerequisites>
    <maven>3.0.5</maven>
  </prerequisites>

  <scm>
    <connection>scm:git:https://github.com/ome/ome-codecs</connection>
    <developerConnection>scm:git:git@github.com:ome/ome-codecs</developerConnection>
    <tag>HEAD</tag>
    <url>http://github.com/ome/ome-codecs</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>org.openmicroscopy</groupId>
      <artifactId>ome-jai</artifactId>
      <version>${ome-jai.version}</version>
    </dependency>
    <dependency>
      <groupId>org.openmicroscopy</groupId>
      <artifactId>ome-common</artifactId>
      <version>${ome-common.version}</version>
    </dependency>
    <dependency>
      <groupId>org.openmicroscopy</groupId>
      <artifactId>lwf-stubs</artifactId>
      <version>${lwf-stubs.version}</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.testng</groupId>
      <artifactId>testng</artifactId>
      <version>6.8</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <properties>
    <ome-common.version>6.0.9</ome-common.version>
    <ome-jai.version>0.1.3</ome-jai.version>
    <ome-stubs.version>5.3.2</ome-stubs.version>
    <lwf-stubs.version>${ome-stubs.version}</lwf-stubs.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.7.0</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.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>Image encoding and decoding routines.</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>
            <skip>true</skip>
        </configuration>
        <executions>
          <execution>
            <id>default-tests</id>
            <phase>test</phase>
            <goals>
              <goal>test</goal>
            </goals>
            <configuration>
              <skip>false</skip>
              <excludes>
                <exclude>%regex[.*Missing.*Test.*]</exclude>
              </excludes>
            </configuration>
          </execution>
          <execution>
            <id>missing-tests</id>
            <phase>test</phase>
            <goals>
              <goal>test</goal>
            </goals>
            <configuration>
              <skip>false</skip>
              <includes>
                <include>%regex[.*Missing.*Test.*]</include>
              </includes>
              <classpathDependencyExcludes>
                 <classpathDependencyExcludes>org.openmicroscopy:ome-jai</classpathDependencyExcludes>
                 <classpathDependencyExcludes>org.openmicroscopy:lwf-stubs</classpathDependencyExcludes>
              </classpathDependencyExcludes>
            </configuration>
          </execution>
        </executions>
      </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/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.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>
  </profiles>
</project>
