<?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">
  <parent>
    <artifactId>jetty-parent</artifactId>
    <groupId>org.eclipse.jetty</groupId>
    <version>31</version>
    <relativePath>../../pom.xml/pom.xml</relativePath>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.eclipse.jetty.toolchain</groupId>
  <artifactId>jetty-servlet-api</artifactId>
  <name>Jetty :: Servlet API and Schemas for JPMS and OSGi</name>
  <version>4.0.9</version>
  <scm>
    <connection>scm:git:https://github.com/jetty/jetty-servlet-api.git</connection>
    <developerConnection>scm:git:git@github.com:jetty/jetty-servlet-api.git</developerConnection>
    <tag>jetty-servlet-api-4.0.9</tag>
    <url>https://github.com/jetty/jetty-servlet-api</url>
  </scm>
  <build>
    <plugins>
      <plugin>
        <groupId>com.mycila</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>5.1.9</version>
        <extensions>true</extensions>
        <executions>
          <execution>
            <id>bundle-manifest</id>
            <goals>
              <goal>manifest</goal>
            </goals>
            <configuration>
              <manifestLocation>${project.build.directory}/manifest/</manifestLocation>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <instructions>
            <Bundle-SymbolicName>org.eclipse.jetty.servlet-api</Bundle-SymbolicName>
            <Bundle-Name>Eclipse Jetty Servlet API and Schemas for JPMS and OSGi</Bundle-Name>
            <Bundle-Description>Combined servlet api and schemas for use in JPMS and OSGi environments</Bundle-Description>
            <Bundle-RequiredExecutionEnvironment>JavaSE-11</Bundle-RequiredExecutionEnvironment>
            <Bundle-Vendor>Eclipse</Bundle-Vendor>
            <Bundle-DocURL>https://eclipse.org/jetty</Bundle-DocURL>
            <_nouses>true</_nouses>
            <Export-Package>javax.servlet;uses:="javax.servlet.annotation,javax.servlet.descriptor";version="4.0.0",
              javax.servlet.resources;version="4.0.0",
              javax.servlet.jsp.resources;version="4.0.0",
              javax.servlet.annotation;uses:="javax.servlet";version="4.0.0",
              javax.servlet.http;uses:="javax.servlet";version="4.0.0",
              javax.servlet.descriptor;version="4.0.0"</Export-Package>
            <Import-Package>java.io,
              java.lang,
              java.lang.annotation,
              java.lang.invoke,
              java.lang.reflect,
              java.net,
              java.security,
              java.text,
              java.util,
              java.util.function</Import-Package>
          </instructions>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>3.2.0</version>
        <executions>
          <execution>
            <id>copy-servlet-resources</id>
            <phase>process-resources</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <target>
                <move>
                  <fileset />
                </move>
                <copy>
                  <fileset>
                    <exclude />
                    <exclude />
                    <exclude />
                  </fileset>
                </copy>
              </target>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>unpack-source</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>unpack-dependencies</goal>
            </goals>
            <configuration>
              <classifier>sources</classifier>
              <includeScope>compile</includeScope>
              <failOnMissingClassifierArtifact>false</failOnMissingClassifierArtifact>
              <outputDirectory>${deps.sources.directory}</outputDirectory>
              <excludes>META-INF/**,
                pom.xml,
                about.html</excludes>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>3.5.4</version>
        <executions>
          <execution>
            <id>integration-test</id>
            <goals>
              <goal>integration-test</goal>
            </goals>
          </execution>
          <execution>
            <id>verify</id>
            <goals>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <includes>
            <include>IT*.java</include>
          </includes>
          <systemPropertyVariables>
            <projectVersion>${project.version}</projectVersion>
            <projectJar>${project.build.directory}/${project.build.finalName}.jar</projectJar>
            <projectJarSource>${project.build.directory}/${project.build.finalName}-sources.jar</projectJarSource>
            <maven.it.name>${project.groupId}:${project.artifactId}</maven.it.name>
          </systemPropertyVariables>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <source>8</source>
          <doclint>none</doclint>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <createSourcesJar>false</createSourcesJar>
              <shadeSourcesContent>true</shadeSourcesContent>
              <createDependencyReducedPom>true</createDependencyReducedPom>
              <dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation>
              <filters>
                <filter>
                  <artifact>${project.groupId}:${project.artifactId}</artifact>
                  <includes>
                    <include>**/*</include>
                  </includes>
                  <excludes>
                    <exclude>META-INF/MANIFEST.MF</exclude>
                  </excludes>
                </filter>
                <filter>
                  <artifact>jakarta.servlet:*</artifact>
                  <excludes>
                    <exclude>**/*</exclude>
                  </excludes>
                </filter>
                <filter>
                  <artifact>*:jetty-schemas</artifact>
                  <excludes>
                    <exclude>**/*</exclude>
                  </excludes>
                </filter>
              </filters>
              <transformers>
                <transformer>
                  <resource>META-INF/MANIFEST.MF</resource>
                  <file>${project.build.directory}/manifest/MANIFEST.MF</file>
                </transformer>
              </transformers>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.2.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <archive>
                <manifestEntries>
                  <Implementation-Version>${project.version}</Implementation-Version>
                  <Implementation-Vendor>Eclipse.org - Jetty</Implementation-Vendor>
                  <url>${jetty.url}</url>
                </manifestEntries>
              </archive>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>3.4.0</version>
        <executions>
          <execution>
            <id>set-osgi-version</id>
            <phase>validate</phase>
            <goals>
              <goal>parse-version</goal>
            </goals>
          </execution>
          <execution>
            <id>add-source</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>${deps.sources.directory}</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.moditect</groupId>
        <artifactId>moditect-maven-plugin</artifactId>
        <version>1.0.0.Final</version>
        <executions>
          <execution>
            <id>add-module-info</id>
            <phase>package</phase>
            <goals>
              <goal>add-module-info</goal>
            </goals>
            <configuration>
              <overwriteExistingFiles>true</overwriteExistingFiles>
              <module>
                <moduleInfoSource>module jetty.servlet.api {
                  exports javax.servlet;
                  exports javax.servlet.annotation;
                  exports javax.servlet.descriptor;
                  exports javax.servlet.http;
                  exports javax.servlet.resources;
                  //open resources so Class.getResource() can access them
                  opens javax.servlet.resources;
                  }</moduleInfoSource>
              </module>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>org.eclipse.jetty.toolchain</groupId>
      <artifactId>jetty-test-helper</artifactId>
      <version>6.4</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>hamcrest</artifactId>
          <groupId>org.hamcrest</groupId>
        </exclusion>
        <exclusion>
          <artifactId>junit-jupiter</artifactId>
          <groupId>org.junit.jupiter</groupId>
        </exclusion>
        <exclusion>
          <artifactId>junit-platform-commons</artifactId>
          <groupId>org.junit.platform</groupId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
  <properties>
    <deps.sources.directory>${project.build.directory}/sources/</deps.sources.directory>
    <jdk.version.minimum>11</jdk.version.minimum>
  </properties>
</project>
