<?xml version="1.0" encoding="US-ASCII"?>
<!--
 ! Copyright (c) 2012-2023 Red Hat, Inc.
 !
 ! Licensed under the Apache License, Version 2.0 (the "License");
 ! you may not use this file except in compliance with the License.
 ! You may obtain a copy of the License at
 !
 !     http://www.apache.org/licenses/LICENSE-2.0
 !
 ! Unless required by applicable law or agreed to in writing, software
 ! distributed under the License is distributed on an "AS IS" BASIS,
 ! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 ! See the License for the specific language governing permissions and
 ! limitations under the License.
 `-->
<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>io.kojan</groupId>
    <artifactId>kojan-parent</artifactId>
    <version>1</version>
  </parent>
  <artifactId>java-deptools-native</artifactId>
  <version>1.0.1</version>
  <name>java-deptools</name>

  <dependencies>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-compress</artifactId>
      <version>1.25.0</version>
    </dependency>
    <dependency>
      <groupId>org.tukaani</groupId>
      <artifactId>xz</artifactId>
      <version>1.9</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>com.github.luben</groupId>
      <artifactId>zstd-jni</artifactId>
      <version>1.5.5-10</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <version>5.10.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>3.6.2</version>
          <configuration>
            <release>21</release>
            <additionalOptions>--enable-preview</additionalOptions>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.11.0</version>
        <configuration>
          <release>21</release>
        </configuration>
        <executions>
          <execution>
            <id>default-compile</id>
            <goals>
              <goal>compile</goal>
            </goals>
            <configuration>
              <excludes>
                <exclude>**/DynamicLinker.java</exclude>
                <exclude>**/NativeInvocationHandler.java</exclude>
                <exclude>**/NativePointerImpl.java</exclude>
              </excludes>
            </configuration>
          </execution>
          <execution>
            <id>compile-preview</id>
            <goals>
              <goal>compile</goal>
            </goals>
            <configuration>
              <compilerArgs>
                <arg>--enable-preview</arg>
              </compilerArgs>
              <includes>
                <include>**/module-info.java</include>
                <include>**/DynamicLinker.java</include>
                <include>**/NativeInvocationHandler.java</include>
                <include>**/NativePointerImpl.java</include>
              </includes>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>3.2.2</version>
        <configuration>
          <argLine>--enable-preview --enable-native-access io.kojan.javadeptools.rpm</argLine>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
