<?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>
  <parent>
    <groupId>com.io7m.smfj</groupId>
    <artifactId>io7m-smfj</artifactId>
    <version>0.6.0</version>
  </parent>
  <artifactId>io7m-smfj-format-binary</artifactId>

  <packaging>bundle</packaging>
  <name>io7m-smfj-format-binary</name>
  <description>Sequential mesh format (Binary format)</description>
  <url>http://io7m.github.io/smfj/</url>

  <scm>
    <url>${project.parent.scm.url}</url>
    <connection>${project.parent.scm.connection}</connection>
    <developerConnection>${project.parent.scm.developerConnection}</developerConnection>
  </scm>

  <dependencies>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>io7m-smfj-core</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>io7m-smfj-parser-api</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>io7m-smfj-serializer-api</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>com.io7m.jnull</groupId>
      <artifactId>io7m-jnull-core</artifactId>
    </dependency>
    <dependency>
      <groupId>com.io7m.jfunctional</groupId>
      <artifactId>io7m-jfunctional-core</artifactId>
    </dependency>
    <dependency>
      <groupId>com.io7m.junreachable</groupId>
      <artifactId>io7m-junreachable-core</artifactId>
    </dependency>
    <dependency>
      <groupId>com.io7m.jaffirm</groupId>
      <artifactId>io7m-jaffirm-core</artifactId>
    </dependency>
    <dependency>
      <groupId>com.io7m.jpra</groupId>
      <artifactId>io7m-jpra-runtime-java</artifactId>
    </dependency>
    <dependency>
      <groupId>com.io7m.ieee754b16</groupId>
      <artifactId>io7m-ieee754b16-core</artifactId>
    </dependency>
    <dependency>
      <groupId>com.io7m.jfsm</groupId>
      <artifactId>io7m-jfsm-core</artifactId>
    </dependency>

    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.immutables</groupId>
      <artifactId>value</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <!-- Check style -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>com.io7m.jpra</groupId>
        <artifactId>io7m-jpra-maven-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>generate-java</goal>
            </goals>
            <phase>generate-sources</phase>
            <configuration>
              <packages>
                <package>com.io7m.smfj.format.binary.v1</package>
              </packages>
              <targetDirectory>
                ${project.build.directory}/generated-sources/jpra
              </targetDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <!-- Produce OSGi bundle -->
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Export-Package>
              com.io7m.smfj.format.binary
            </Export-Package>
          </instructions>
        </configuration>
      </plugin>
    </plugins>
  </build>

</project>
