|  | <?xml version="1.0"?> | 
|  | <!-- | 
|  |  | 
|  | Copyright (c) 2011, 2024 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.connectors</groupId> | 
|  | <artifactId>project</artifactId> | 
|  | <version>3.0.99-SNAPSHOT</version> | 
|  | </parent> | 
|  |  | 
|  | <artifactId>jersey-jetty-connector</artifactId> | 
|  | <packaging>jar</packaging> | 
|  | <name>jersey-connectors-jetty</name> | 
|  |  | 
|  | <description>Jersey Client Transport via Jetty</description> | 
|  |  | 
|  | <properties> | 
|  | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | 
|  | <java8.build.outputDirectory>${project.basedir}/target</java8.build.outputDirectory> | 
|  | <java8.sourceDirectory>${project.basedir}/src/main/java8</java8.sourceDirectory> | 
|  | <java11.build.outputDirectory>${project.basedir}/target11</java11.build.outputDirectory> | 
|  | <java11.sourceDirectory>${project.basedir}/src/main/java11</java11.sourceDirectory> | 
|  | </properties> | 
|  |  | 
|  | <dependencies> | 
|  | <dependency> | 
|  | <groupId>org.eclipse.jetty</groupId> | 
|  | <artifactId>jetty-client</artifactId> | 
|  | <exclusions> | 
|  | <exclusion> | 
|  | <groupId>org.slf4j</groupId> | 
|  | <artifactId>slf4j-api</artifactId> | 
|  | </exclusion> | 
|  | </exclusions> | 
|  | </dependency> | 
|  | <dependency> | 
|  | <groupId>org.eclipse.jetty</groupId> | 
|  | <artifactId>jetty-util</artifactId> | 
|  | <exclusions> | 
|  | <exclusion> | 
|  | <groupId>org.slf4j</groupId> | 
|  | <artifactId>slf4j-api</artifactId> | 
|  | </exclusion> | 
|  | </exclusions> | 
|  | </dependency> | 
|  |  | 
|  | <dependency> | 
|  | <groupId>org.glassfish.jersey.media</groupId> | 
|  | <artifactId>jersey-media-jaxb</artifactId> | 
|  | <version>${project.version}</version> | 
|  | <scope>test</scope> | 
|  | </dependency> | 
|  | <dependency> | 
|  | <groupId>org.glassfish.jersey.containers</groupId> | 
|  | <artifactId>jersey-container-jetty-http</artifactId> | 
|  | <version>${project.version}</version> | 
|  | <scope>test</scope> | 
|  | </dependency> | 
|  | <!--        <dependency>--> | 
|  | <!--            <groupId>org.glassfish.jersey.media</groupId>--> | 
|  | <!--            <artifactId>jersey-media-json-jackson</artifactId>--> | 
|  | <!--            <version>${project.version}</version>--> | 
|  | <!--            <scope>test</scope>--> | 
|  | <!--        </dependency>--> | 
|  | <dependency> | 
|  | <groupId>org.glassfish.jersey.test-framework.providers</groupId> | 
|  | <artifactId>jersey-test-framework-provider-jetty</artifactId> | 
|  | <version>${project.version}</version> | 
|  | <scope>test</scope> | 
|  | </dependency> | 
|  | </dependencies> | 
|  |  | 
|  | <build> | 
|  | <plugins> | 
|  | <plugin> | 
|  | <groupId>com.sun.istack</groupId> | 
|  | <artifactId>istack-commons-maven-plugin</artifactId> | 
|  | <inherited>true</inherited> | 
|  | </plugin> | 
|  | <plugin> | 
|  | <groupId>org.codehaus.mojo</groupId> | 
|  | <artifactId>build-helper-maven-plugin</artifactId> | 
|  | <inherited>true</inherited> | 
|  | </plugin> | 
|  | <plugin> | 
|  | <groupId>org.apache.maven.plugins</groupId> | 
|  | <artifactId>maven-compiler-plugin</artifactId> | 
|  | </plugin> | 
|  | <plugin> | 
|  | <!-- TODO remove after jakartification --> | 
|  | <groupId>org.apache.maven.plugins</groupId> | 
|  | <artifactId>maven-surefire-plugin</artifactId> | 
|  | <executions> | 
|  | <execution> | 
|  | <id>default-test</id> <!-- jakartification-excluded-tests --> | 
|  | <configuration> | 
|  | <excludes> | 
|  | <exclude>org/glassfish/jersey/jetty/connector/EntityTest.java</exclude> | 
|  | </excludes> | 
|  | </configuration> | 
|  | </execution> | 
|  | </executions> | 
|  | </plugin> | 
|  | <plugin> | 
|  | <groupId>org.apache.felix</groupId> | 
|  | <artifactId>maven-bundle-plugin</artifactId> | 
|  | <inherited>true</inherited> | 
|  | <configuration> | 
|  | <instructions> | 
|  | <Import-Package> | 
|  | ${jetty.osgi.version}, | 
|  | * | 
|  | </Import-Package> | 
|  | </instructions> | 
|  | </configuration> | 
|  | </plugin> | 
|  | </plugins> | 
|  | </build> | 
|  |  | 
|  | <profiles> | 
|  | <profile> | 
|  | <id>JettyExclude</id> | 
|  | <activation> | 
|  | <jdk>1.8</jdk> | 
|  | </activation> | 
|  | <properties> | 
|  | <jetty.version>${jetty9.version}</jetty.version> | 
|  | </properties> | 
|  | <dependencies> | 
|  | <dependency> | 
|  | <groupId>org.eclipse.jetty</groupId> | 
|  | <artifactId>jetty-client</artifactId> | 
|  | <version>${jetty.version}</version> | 
|  | <exclusions> | 
|  | <exclusion> | 
|  | <groupId>org.slf4j</groupId> | 
|  | <artifactId>slf4j-api</artifactId> | 
|  | </exclusion> | 
|  | </exclusions> | 
|  | </dependency> | 
|  | <dependency> | 
|  | <groupId>org.eclipse.jetty</groupId> | 
|  | <artifactId>jetty-util</artifactId> | 
|  | <version>${jetty.version}</version> | 
|  | <exclusions> | 
|  | <exclusion> | 
|  | <groupId>org.slf4j</groupId> | 
|  | <artifactId>slf4j-api</artifactId> | 
|  | </exclusion> | 
|  | </exclusions> | 
|  | </dependency> | 
|  | </dependencies> | 
|  | <build> | 
|  | <directory>${java8.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>${java8.sourceDirectory}</source> | 
|  | </sources> | 
|  | </configuration> | 
|  | </execution> | 
|  | </executions> | 
|  | </plugin> | 
|  | <plugin> | 
|  | <groupId>org.apache.maven.plugins</groupId> | 
|  | <artifactId>maven-compiler-plugin</artifactId> | 
|  | <configuration> | 
|  | <testExcludes> | 
|  | <testExclude>org/glassfish/jersey/jetty/connector/*.java</testExclude> | 
|  | </testExcludes> | 
|  | </configuration> | 
|  | </plugin> | 
|  | </plugins> | 
|  | </build> | 
|  | </profile> | 
|  | <profile> | 
|  | <id>Jetty11</id> | 
|  | <activation> | 
|  | <jdk>[11,)</jdk> | 
|  | </activation> | 
|  | <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>copyJDK11FilesToMultiReleaseJar</id> | 
|  | <activation> | 
|  | <file> | 
|  | <!-- ${java11.build.outputDirectory} does not work here --> | 
|  | <exists>target11/classes/org/glassfish/jersey/jetty/connector/JettyConnectorProvider.class</exists> | 
|  | </file> | 
|  | <jdk>1.8</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-jdk11-classes</id> | 
|  | <phase>prepare-package</phase> | 
|  | <goals> | 
|  | <goal>copy-resources</goal> | 
|  | </goals> | 
|  | <configuration> | 
|  | <outputDirectory>${java8.build.outputDirectory}/classes/META-INF/versions/11</outputDirectory> | 
|  | <resources> | 
|  | <resource> | 
|  | <directory>${java11.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-jdk11-sources</id> | 
|  | <phase>package</phase> | 
|  | <configuration> | 
|  | <target> | 
|  | <property name="sources-jar" value="${java8.build.outputDirectory}/${project.artifactId}-${project.version}-sources.jar"/> | 
|  | <echo>sources-jar: ${sources-jar}</echo> | 
|  | <zip destfile="${sources-jar}" update="true"> | 
|  | <zipfileset dir="${java11.sourceDirectory}" prefix="META-INF/versions/11"/> | 
|  | </zip> | 
|  | </target> | 
|  | </configuration> | 
|  | <goals> | 
|  | <goal>run</goal> | 
|  | </goals> | 
|  | </execution> | 
|  | </executions> | 
|  | </plugin> | 
|  | </plugins> | 
|  | </build> | 
|  | </profile> | 
|  | </profiles> | 
|  |  | 
|  | </project> |