<?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/maven-v4_0_0.xsd">

  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.eclipse.jetty.ee9</groupId>
    <artifactId>jetty-ee9</artifactId>
    <version>12.1.1</version>
  </parent>
  <artifactId>jetty-ee9-annotations</artifactId>
  <name>EE9 :: Servlet Annotations</name>
  <description>Annotation support for deploying servlets in jetty.</description>
  <properties>
    <bundle-symbolic-name>${project.groupId}.annotations</bundle-symbolic-name>
    <spotbugs.onlyAnalyze>org.eclipse.jetty.ee9.annotations.*</spotbugs.onlyAnalyze>
  </properties>

  <dependencies>
    <dependency>
      <groupId>jakarta.annotation</groupId>
      <artifactId>jakarta.annotation-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-annotations</artifactId>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-plus</artifactId>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty.ee</groupId>
      <artifactId>jetty-ee-webapp</artifactId>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty.ee9</groupId>
      <artifactId>jetty-ee9-plus</artifactId>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty.ee9</groupId>
      <artifactId>jetty-ee9-webapp</artifactId>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty.toolchain</groupId>
      <artifactId>jetty-jakarta-servlet-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.ow2.asm</groupId>
      <artifactId>asm</artifactId>
    </dependency>
    <dependency>
      <groupId>org.ow2.asm</groupId>
      <artifactId>asm-commons</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-slf4j-impl</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <testResources>
      <testResource>
        <directory>src/test/resources</directory>
      </testResource>
      <testResource>
        <targetPath>jar</targetPath>
        <directory>src/test/jar</directory>
      </testResource>
    </testResources>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Import-Package>${osgi.slf4j.import.packages},org.objectweb.asm;version="[$(version;==;${asm.version}),$(version;+;${asm.version}))",*</Import-Package>
            <Require-Capability>osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)", osgi.serviceloader; filter:="(osgi.serviceloader=jakarta.servlet.ServletContainerInitializer)";resolution:=optional;cardinality:=multiple, osgi.extender; filter:="(osgi.extender=osgi.serviceloader.processor)";resolution:=optional</Require-Capability>
            <Provide-Capability>osgi.serviceloader; osgi.serviceloader=org.eclipse.jetty.ee9.webapp.Configuration</Provide-Capability>
          </instructions>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <argLine>@{argLine} ${jetty.surefire.argLine} --add-reads org.eclipse.jetty.ee9.annotations=org.eclipse.jetty.logging --add-opens org.eclipse.jetty.ee9.annotations/org.eclipse.jetty.ee9.annotations.resources=org.eclipse.jetty.plus</argLine>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
