<?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-selftest-native-image</artifactId>
    <packaging>jar</packaging>
    <parent>
        <groupId>com.kohlschutter.junixsocket</groupId>
        <artifactId>junixsocket</artifactId>
        <version>2.9.1</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    <name>junixsocket-selftest-native-image</name>
    <properties>
        <kohlschutter.project.base.directory>${project.parent.basedir}</kohlschutter.project.base.directory>
    </properties>

    <description>junixsocket's selftest as a GraalVM native-image; run "mvn clean package -Pnative" to create a native binary in target/junixsocket-selftest-native-image</description>

    <profiles>
        <profile>
            <id>native</id>
            <activation>
                <property>
                    <name>native</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.graalvm.buildtools</groupId>
                        <artifactId>native-maven-plugin</artifactId>
                        <extensions>true</extensions>
                        <executions>
                            <execution>
                                <id>build-native</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>compile-no-fork</goal>
                                </goals>
                                <configuration>
                                    <mainClass>org.newsclub.net.unix.selftest.Selftest</mainClass>
                                </configuration>
                            </execution>
                        </executions>
                        <configuration>
                            <skip>false</skip>
                            <useArgFile>false</useArgFile>
                            <imageName>${project.name}-${project.version}</imageName>
                            <fallback>false</fallback>
                        </configuration>
                    </plugin>
                </plugins>

                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.graalvm.buildtools</groupId>
                            <artifactId>native-maven-plugin</artifactId>
                            <version>0.10.1</version>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
    </profiles>

    <repositories>
        <repository>
            <id>sonatype.snapshots</id>
            <name>Sonatype snapshot repository</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
            <layout>default</layout>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>com.kohlschutter.junixsocket</groupId>
            <artifactId>junixsocket-selftest</artifactId>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>com.kohlschutter.junixsocket</groupId>
            <artifactId>junixsocket-core</artifactId>
            <type>pom</type>
        </dependency>
        <!--
        <dependency>
            <groupId>com.kohlschutter.junixsocket</groupId>
            <artifactId>junixsocket-native-custom</artifactId>
            <version>${project.version}</version>
            <optional>true</optional>
        </dependency>
        -->
        <dependency>
            <groupId>com.kohlschutter.junixsocket</groupId>
            <artifactId>junixsocket-tipc</artifactId>
        </dependency>
        <dependency>
            <groupId>com.kohlschutter.junixsocket</groupId>
            <artifactId>junixsocket-vsock</artifactId>
        </dependency>
        <dependency>
            <groupId>com.kohlschutter.junixsocket</groupId>
            <artifactId>junixsocket-rmi</artifactId>
        </dependency>
        <dependency>
            <groupId>com.kohlschutter.junixsocket</groupId>
            <artifactId>junixsocket-ssl</artifactId>
        </dependency>
        <dependency>
            <groupId>com.kohlschutter.junixsocket</groupId>
            <artifactId>junixsocket-darwin</artifactId>
        </dependency>
        <dependency>
            <groupId>com.kohlschutter.junixsocket</groupId>
            <artifactId>junixsocket-server</artifactId>
        </dependency>

        <dependency>
            <groupId>com.kohlschutter</groupId>
            <artifactId>kohlschutter-test-util</artifactId>
        </dependency>
        <dependency>
            <groupId>com.kohlschutter</groupId>
            <artifactId>kohlschutter-util</artifactId>
        </dependency>

        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-console</artifactId>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
        </dependency>
    </dependencies>
</project>
