<?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>org.daisy</groupId>
    <artifactId>daisy</artifactId>
    <version>3</version>
    <relativePath />
  </parent>
  <groupId>org.daisy.bindings</groupId>
  <artifactId>jhyphen</artifactId>
  <version>1.0.4</version>
  <packaging>bundle</packaging>
  <name>jhyphen</name>
  <description>Java bindings for the 'libhyphen' hyphenation library</description>
  <url>https://github.com/daisy-consortium/jhyphen</url>
  <scm>
    <connection>scm:git:git@github.com:daisy-consortium/jhyphen.git</connection>
    <developerConnection>scm:git:git@github.com:daisy-consortium/jhyphen.git</developerConnection>
    <url>git@github.com:daisy-consortium/jhyphen.git</url>
    <tag>1.0.4</tag>
  </scm>
  <licenses>
    <license>
      <name>GNU Lesser General Public License 3</name>
      <url>http://www.gnu.org/licenses/lgpl.html</url>
    </license>
  </licenses>
  <developers>
    <developer>
      <name>Bert Frees</name>
      <email>bertfrees@gmail.com</email>
      <url>http://github.com/bertfrees</url>
      <organization>SBS - Schweizerische Bibliothek für Blinde, Seh- und Lesebehinderte</organization>
      <organizationUrl>http://www.sbs.ch</organizationUrl>
    </developer>
  </developers>
  <dependencies>
    <dependency>
      <groupId>net.java.dev.jna</groupId>
      <artifactId>jna</artifactId>
      <version>5.14.0</version>
    </dependency>
    <dependency>
      <groupId>org.daisy.libs</groupId>
      <artifactId>hyphen</artifactId>
      <version>2.8.8-p1</version>
      <type>nar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.8.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-io</artifactId>
      <version>1.3.2</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <configuration>
            <tagNameFormat>@{project.version}</tagNameFormat>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>com.github.maven-nar</groupId>
        <artifactId>nar-maven-plugin</artifactId>
        <version>3.4.0</version>
        <executions>
          <execution>
            <id>get-nar-aol-property</id>
            <phase>generate-test-resources</phase>
            <goals>
              <goal>nar-validate</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>unpack-libhyphen</id>
            <phase>generate-test-resources</phase>
            <goals>
              <goal>unpack</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>org.daisy.libs</groupId>
                  <artifactId>hyphen</artifactId>
                  <classifier>${nar.aol}-shared</classifier>
                  <type>nar</type>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <forkMode>pertest</forkMode>
          <systemPropertyVariables>
            <jna.nosys>true</jna.nosys>
          </systemPropertyVariables>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>2.3.7</version>
        <extensions>true</extensions>
        <configuration>
          <archive>
            <addMavenDescriptor>false</addMavenDescriptor>
          </archive>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>aarch64-MacOSX</id>
      <activation>
        <os>
          <family>mac</family>
          <arch>aarch64</arch>
        </os>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>com.github.maven-nar</groupId>
            <artifactId>nar-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>get-nar-aol-property</id>
                <!-- nar-validate throws error -->
                <phase>none</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
      <properties>
        <nar.aol>aarch64-MacOSX-gpp</nar.aol>
      </properties>
    </profile>
  </profiles>
</project>
