<?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>
  <artifactId>junixsocket-native-common</artifactId>
  <packaging>jar</packaging>
  <parent>
    <groupId>com.kohlschutter.junixsocket</groupId>
    <artifactId>junixsocket-parent</artifactId>
    <!-- Update this manually after maven-release -->
    <version>2.0.4</version>
    <relativePath>../pom.xml</relativePath>
  </parent>
  <name>junixsocket-native-common</name>
  <properties>
    <kohlschutter.project.base.directory>${project.parent.basedir}</kohlschutter.project.base.directory>
  </properties>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>2.3</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <artifactSet>
                <includes>
                  <include>com.kohlschutter.junixsocket:junixsocket-native</include>
                </includes>
              </artifactSet>
              <promoteTransitiveDependencies>true</promoteTransitiveDependencies>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.github.maven-nar</groupId>
        <artifactId>nar-maven-plugin</artifactId>
        <version>3.2.0</version>
        <extensions>true</extensions>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>com.kohlschutter.junixsocket</groupId>
      <artifactId>junixsocket-common</artifactId>
      <version>${project.parent.version}</version>
    </dependency>
    <dependency>
      <groupId>com.kohlschutter.junixsocket</groupId>
      <artifactId>junixsocket-native</artifactId>
      <version>${project.version}</version>
      <type>nar</type>
    </dependency>
  </dependencies>
  <profiles>
    <!-- Specify profiles to add particular nars -->
    <!-- Example: mvn clean install -Px86_64-MacOSX-gpp-jni,amd64-Linux-gpp-jni -->
    <profile>
      <id>x86_64-MacOSX-gpp-jni</id>
      <activation>
        <os>
          <arch>x86_64</arch>
          <family>mac</family>
        </os>
      </activation>
      <dependencies>
        <dependency>
          <groupId>com.kohlschutter.junixsocket</groupId>
          <artifactId>junixsocket-native</artifactId>
          <version>${project.version}</version>
          <type>nar</type>
          <classifier>x86_64-MacOSX-gpp-jni</classifier>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>amd64-Linux-gpp-jni</id>
      <activation>
        <os>
          <arch>amd64</arch>
          <name>Linux</name>
        </os>
      </activation>
      <dependencies>
        <dependency>
          <groupId>com.kohlschutter.junixsocket</groupId>
          <artifactId>junixsocket-native</artifactId>
          <version>${project.version}</version>
          <type>nar</type>
          <classifier>amd64-Linux-gpp-jni</classifier>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>release</id>
      <dependencies>
        <dependency>
          <groupId>com.kohlschutter.junixsocket</groupId>
          <artifactId>junixsocket-native</artifactId>
          <version>${project.version}</version>
          <type>nar</type>
          <classifier>x86_64-MacOSX-gpp-jni</classifier>
        </dependency>
        <dependency>
          <groupId>com.kohlschutter.junixsocket</groupId>
          <artifactId>junixsocket-native</artifactId>
          <version>${project.version}</version>
          <type>nar</type>
          <classifier>amd64-Linux-gpp-jni</classifier>
        </dependency>
      </dependencies>
    </profile>
  </profiles>
</project>
