<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/maven-v4_0_0.xsd">
  <parent>
    <groupId>org.eclipse.jetty.toolchain</groupId>
    <artifactId>jetty-toolchain</artifactId>
    <version>1.7</version>
    <relativePath>../jetty-toolchain</relativePath>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.eclipse.jetty.toolchain.setuid</groupId>
  <artifactId>jetty-setuid-jna</artifactId>
  <version>2.0.1</version>
  <name>Jetty :: SetUID JNA</name>
  <packaging>jar</packaging>
  <properties>
    <compiler.source>17</compiler.source>
    <compiler.target>17</compiler.target>
    <compiler.release>17</compiler.release>
    <jetty.version>12.0.0</jetty.version>
    <jna.version>5.13.0</jna.version>
    <jetty-test-helper.version>6.1</jetty-test-helper.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
  <licenses>
    <license>
      <name>Eclipse Public License - Version 2.0</name>
      <url>https://www.eclipse.org/legal/epl-2.0/</url>
    </license>
    <license>
      <name>Apache Software License - Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0</url>
    </license>
  </licenses>
  <dependencies>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-server</artifactId>
      <version>${jetty.version}</version>
    </dependency>
    <dependency>
      <groupId>net.java.dev.jna</groupId>
      <artifactId>jna</artifactId>
      <version>${jna.version}</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>2.0.7</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty.toolchain</groupId>
      <artifactId>jetty-test-helper</artifactId>
      <version>${jetty-test-helper.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.11.0</version>
        <configuration>
          <source>${compiler.source}</source>
          <target>${compiler.target}</target>
          <release>${compiler.release}</release>
          <showWarnings>true</showWarnings>
          <compilerArgument>-Xlint:all</compilerArgument>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>3.0.1</version>
        <configuration>
          <useReleaseProfile>true</useReleaseProfile>
          <releaseProfiles>eclipse-release</releaseProfiles>
          <autoVersionSubmodules>true</autoVersionSubmodules>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>3.3.0</version>
        <executions>
          <execution>
            <id>enforce-build-env</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <phase>validate</phase>
            <configuration>
              <rules>
                <requireMavenVersion>
                  <version>[3.8.4,)</version>
                  <message>[ERROR] OLD MAVEN [${maven.version}] in use, Jetty ${project.version} requires Maven 3.8.4 or newer</message>
                </requireMavenVersion>
                <requireJavaVersion>
                  <version>[17,)</version>
                  <message>[ERROR] OLD JDK [${java.version}] in use. Jetty ${project.version} requires JDK 17 or newer</message>
                </requireJavaVersion>
                <requireUpperBoundDeps />
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-resources</id>
            <phase>process-resources</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <encoding>UTF-8</encoding>
              <useDefaultDelimiters>false</useDefaultDelimiters>
              <delimiters>
                <delimiter>@</delimiter>
              </delimiters>
              <outputDirectory>${project.build.directory}/jetty-config-files</outputDirectory>
              <resources>
                <resource>
                  <directory>src/main/config</directory>
                  <filtering>true</filtering>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.mycila</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <version>4.2</version>
        <configuration>
          <licenseSets>
            <licenseSet>
              <header>header-template.txt</header>
              <includes>
                <include>**/*.java</include>
              </includes>
            </licenseSet>
          </licenseSets>
          <failIfMissing>true</failIfMissing>
          <aggregate>true</aggregate>
          <strictCheck>true</strictCheck>
          <mapping>
            <java>DOUBLESLASH_STYLE</java>
          </mapping>
        </configuration>
        <executions>
          <execution>
            <id>check-headers</id>
            <phase>validate</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>3.6.0</version>
        <dependencies>
          <dependency>
            <groupId>org.eclipse.jetty.toolchain</groupId>
            <artifactId>jetty-assembly-descriptors</artifactId>
            <version>1.0</version>
          </dependency>
        </dependencies>
        <executions>
          <execution>
            <id>assemble-config</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptors>
                <descriptor>src/main/assembly/config.xml</descriptor>
              </descriptors>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <scm>
    <connection>scm:git:https://github.com/eclipse/jetty.toolchain.git</connection>
    <developerConnection>scm:git:git@github.com:eclipse/jetty.toolchain.git</developerConnection>
    <url>https://github.com/eclipse/jetty.toolchain/tree/master/jetty-setuid</url>
    <tag>jetty-setuid-jna-2.0.1</tag>
  </scm>
</project>
