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

    <description>junixsocket is a Java/JNI library that allows the use of Unix Domain Sockets (AF_UNIX sockets) and other socket types, such as AF_TIPC and AF_VSOCK, from Java, using the standard Socket API</description>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <!-- Build JNI headers automatically -->
                <configuration>
                    <compilerArgs>
                        <arg>-h</arg>
                        <arg>${kohlschutter.project.base.directory}/junixsocket-native/src/main/c</arg>
                        <arg>${xlint.compiler.arg}</arg>
                    </compilerArgs>

                    <!-- Prevent emitting a warning for packages with only a package-info.java present -->
                    <createMissingPackageInfoClass>false</createMissingPackageInfoClass>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>with-native-custom</id>
            <activation>
                <property>
                    <name>!junixsocket.native-custom.skip</name>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>com.kohlschutter.junixsocket</groupId>
                    <artifactId>junixsocket-native-custom</artifactId>
                    <version>${project.version}</version>
                    <scope>test</scope>
                    <classifier>default</classifier>
                    <optional>true</optional>
                </dependency>
            </dependencies>
        </profile>
    </profiles>

    <dependencies>
        <dependency>
            <groupId>com.kohlschutter.junixsocket</groupId>
            <artifactId>junixsocket-native-common</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>animal-sniffer-annotations</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>
</project>
