| <?xml version="1.0" encoding="UTF-8"?> | 
 | <!-- | 
 |  | 
 |     Copyright (c) 2012, 2023 Oracle and/or its affiliates. All rights reserved. | 
 |  | 
 |     This program and the accompanying materials are made available under the | 
 |     terms of the Eclipse Public License v. 2.0, which is available at | 
 |     http://www.eclipse.org/legal/epl-2.0. | 
 |  | 
 |     This Source Code may also be made available under the following Secondary | 
 |     Licenses when the conditions for such availability set forth in the | 
 |     Eclipse Public License v. 2.0 are satisfied: GNU General Public License, | 
 |     version 2 with the GNU Classpath Exception, which is available at | 
 |     https://www.gnu.org/software/classpath/license.html. | 
 |  | 
 |     SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 | 
 |  | 
 | --> | 
 |  | 
 | <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>org.glassfish.jersey.containers</groupId> | 
 |         <artifactId>project</artifactId> | 
 |         <version>3.1.99-SNAPSHOT</version> | 
 |     </parent> | 
 |  | 
 |     <artifactId>jersey-container-jetty-servlet</artifactId> | 
 |     <packaging>jar</packaging> | 
 |     <name>jersey-container-jetty-servlet</name> | 
 |  | 
 |     <description>Jetty Servlet Container</description> | 
 |  | 
 |     <properties> | 
 |         <java11.build.outputDirectory>${project.basedir}/target</java11.build.outputDirectory> | 
 |         <java11.sourceDirectory>${project.basedir}/src/main/java11</java11.sourceDirectory> | 
 |         <java17.build.outputDirectory>${project.basedir}/target17</java17.build.outputDirectory> | 
 |         <java17.sourceDirectory>${project.basedir}/src/main/java17</java17.sourceDirectory> | 
 |     </properties> | 
 |  | 
 |     <dependencies> | 
 |         <dependency> | 
 |             <groupId>org.glassfish.jersey.containers</groupId> | 
 |             <artifactId>jersey-container-servlet</artifactId> | 
 |             <version>${project.version}</version> | 
 |         </dependency> | 
 |         <dependency> | 
 |             <groupId>org.glassfish.jersey.containers</groupId> | 
 |             <artifactId>jersey-container-servlet-core</artifactId> | 
 |             <version>${project.version}</version> | 
 |         </dependency> | 
 |         <dependency> | 
 |             <groupId>jakarta.servlet</groupId> | 
 |             <artifactId>jakarta.servlet-api</artifactId> | 
 |         </dependency> | 
 |         <dependency> | 
 |             <groupId>org.eclipse.jetty.ee10</groupId> | 
 |             <artifactId>jetty-ee10-webapp</artifactId> | 
 |             <exclusions> | 
 |                 <exclusion> | 
 |                     <groupId>org.slf4j</groupId> | 
 |                     <artifactId>slf4j-api</artifactId> | 
 |                 </exclusion> | 
 |             </exclusions> | 
 |         </dependency> | 
 |         <dependency> | 
 |             <groupId>org.glassfish.jersey.containers</groupId> | 
 |             <artifactId>jersey-container-jetty-http</artifactId> | 
 |             <version>${project.version}</version> | 
 |         </dependency> | 
 |     </dependencies> | 
 |  | 
 |     <build> | 
 |         <resources> | 
 |             <resource> | 
 |                 <directory>${project.build.directory}/legal</directory> | 
 |             </resource> | 
 |         </resources> | 
 |         <plugins> | 
 |             <plugin> | 
 |                 <groupId>org.apache.felix</groupId> | 
 |                 <artifactId>maven-bundle-plugin</artifactId> | 
 |                 <inherited>true</inherited> | 
 |                 <extensions>true</extensions> | 
 |                 <configuration> | 
 |                     <instructions> | 
 |                         <Import-Package> | 
 |                             jakarta.servlet.*;version="[5.0,7.0)", | 
 |                             ${jetty.osgi.version}, | 
 |                             * | 
 |                         </Import-Package> | 
 |                     </instructions> | 
 |                     <unpackBundle>true</unpackBundle> | 
 |                 </configuration> | 
 |             </plugin> | 
 |         </plugins> | 
 |     </build> | 
 |  | 
 |     <profiles> | 
 |         <profile> | 
 |             <id>JettyExclude</id> | 
 |             <activation> | 
 |                 <jdk>[11,17)</jdk> | 
 |             </activation> | 
 |             <dependencies> | 
 |                 <dependency> | 
 |                     <groupId>org.eclipse.jetty</groupId> | 
 |                     <artifactId>jetty-webapp</artifactId> | 
 |                     <version>${jetty11.version}</version> | 
 |                     <scope>provided</scope> | 
 |                     <exclusions> | 
 |                         <exclusion> | 
 |                             <groupId>org.slf4j</groupId> | 
 |                             <artifactId>slf4j-api</artifactId> | 
 |                         </exclusion> | 
 |                     </exclusions> | 
 |                 </dependency> | 
 |                 <dependency> | 
 |                     <groupId>org.eclipse.jetty.ee10</groupId> | 
 |                     <artifactId>jetty-ee10-webapp</artifactId> | 
 |                     <scope>provided</scope> | 
 |                     <exclusions> | 
 |                         <exclusion> | 
 |                             <groupId>*</groupId> | 
 |                             <artifactId>*</artifactId> | 
 |                         </exclusion> | 
 |                     </exclusions> | 
 |                 </dependency> | 
 |                 <dependency> | 
 |                     <groupId>org.eclipse.jetty</groupId> | 
 |                     <artifactId>jetty-server</artifactId> | 
 |                     <version>${jetty11.version}</version> | 
 |                     <scope>provided</scope> | 
 |                 </dependency> | 
 |                 <dependency> | 
 |                     <groupId>org.glassfish.jersey.containers</groupId> | 
 |                     <artifactId>jersey-container-jetty-http</artifactId> | 
 |                     <version>${project.version}</version> | 
 |                     <scope>provided</scope> | 
 |                     <exclusions> | 
 |                         <exclusion> | 
 |                             <groupId>org.eclipse.jetty</groupId> | 
 |                             <artifactId>jetty-server</artifactId> | 
 |                         </exclusion> | 
 |                     </exclusions> | 
 |                 </dependency> | 
 |             </dependencies> | 
 |             <build> | 
 |                 <directory>${java11.build.outputDirectory}</directory> | 
 |                 <plugins> | 
 |                     <plugin> | 
 |                         <groupId>org.codehaus.mojo</groupId> | 
 |                         <artifactId>build-helper-maven-plugin</artifactId> | 
 |                         <executions> | 
 |                             <execution> | 
 |                                 <phase>generate-sources</phase> | 
 |                                 <goals> | 
 |                                     <goal>add-source</goal> | 
 |                                 </goals> | 
 |                                 <configuration> | 
 |                                     <sources> | 
 |                                         <source>${java11.sourceDirectory}</source> | 
 |                                     </sources> | 
 |                                 </configuration> | 
 |                             </execution> | 
 |                         </executions> | 
 |                     </plugin> | 
 |                 </plugins> | 
 |             </build> | 
 |         </profile> | 
 |         <profile> | 
 |             <id>JettyInclude</id> | 
 |             <activation> | 
 |                 <jdk>[17,)</jdk> | 
 |             </activation> | 
 |             <build> | 
 |                 <directory>${java17.build.outputDirectory}</directory> | 
 |                 <plugins> | 
 |                     <plugin> | 
 |                         <groupId>org.codehaus.mojo</groupId> | 
 |                         <artifactId>build-helper-maven-plugin</artifactId> | 
 |                         <executions> | 
 |                             <execution> | 
 |                                 <phase>generate-sources</phase> | 
 |                                 <goals> | 
 |                                     <goal>add-source</goal> | 
 |                                 </goals> | 
 |                                 <configuration> | 
 |                                     <sources> | 
 |                                         <source>${java17.sourceDirectory}</source> | 
 |                                     </sources> | 
 |                                 </configuration> | 
 |                             </execution> | 
 |                         </executions> | 
 |                     </plugin> | 
 |                 </plugins> | 
 |             </build> | 
 |         </profile> | 
 |         <profile> | 
 |             <id>copyJDK17FilesToMultiReleaseJar</id> | 
 |             <activation> | 
 |                 <file> | 
 |                     <!-- ${java17.build.outputDirectory} does not work here --> | 
 |                     <exists>target17/classes/org/glassfish/jersey/jetty/JettyWebContainerFactory.class</exists> | 
 |                 </file> | 
 |                 <jdk>[11,17)</jdk> | 
 |             </activation> | 
 |             <build> | 
 |                 <plugins> | 
 |                     <plugin> | 
 |                         <groupId>org.apache.felix</groupId> | 
 |                         <artifactId>maven-bundle-plugin</artifactId> | 
 |                         <inherited>true</inherited> | 
 |                         <extensions>true</extensions> | 
 |                         <configuration> | 
 |                             <instructions> | 
 |                                 <Multi-Release>true</Multi-Release> | 
 |                             </instructions> | 
 |                         </configuration> | 
 |                     </plugin> | 
 |                     <plugin> | 
 |                         <groupId>org.apache.maven.plugins</groupId> | 
 |                         <artifactId>maven-resources-plugin</artifactId> | 
 |                         <inherited>true</inherited> | 
 |                         <executions> | 
 |                             <execution> | 
 |                                 <id>copy-jdk17-classes</id> | 
 |                                 <phase>prepare-package</phase> | 
 |                                 <goals> | 
 |                                     <goal>copy-resources</goal> | 
 |                                 </goals> | 
 |                                 <configuration> | 
 |                                     <outputDirectory>${java11.build.outputDirectory}/classes/META-INF/versions/17</outputDirectory> | 
 |                                     <resources> | 
 |                                         <resource> | 
 |                                             <directory>${java17.build.outputDirectory}/classes</directory> | 
 |                                         </resource> | 
 |                                     </resources> | 
 |                                 </configuration> | 
 |                             </execution> | 
 |                         </executions> | 
 |                     </plugin> | 
 |                     <plugin> | 
 |                         <groupId>org.apache.maven.plugins</groupId> | 
 |                         <artifactId>maven-antrun-plugin</artifactId> | 
 |                         <executions> | 
 |                             <execution> | 
 |                                 <id>copy-jdk17-sources</id> | 
 |                                 <phase>package</phase> | 
 |                                 <configuration> | 
 |                                     <target> | 
 |                                         <property name="sources-jar" value="${java11.build.outputDirectory}/${project.artifactId}-${project.version}-sources.jar"/> | 
 |                                         <echo>sources-jar: ${sources-jar}</echo> | 
 |                                         <zip destfile="${sources-jar}" update="true"> | 
 |                                             <zipfileset dir="${java17.sourceDirectory}" prefix="META-INF/versions/17"/> | 
 |                                         </zip> | 
 |                                     </target> | 
 |                                 </configuration> | 
 |                                 <goals> | 
 |                                     <goal>run</goal> | 
 |                                 </goals> | 
 |                             </execution> | 
 |                         </executions> | 
 |                     </plugin> | 
 |                 </plugins> | 
 |             </build> | 
 |         </profile> | 
 |     </profiles> | 
 |  | 
 | </project> |