jersey-common
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency> <groupId>org.glassfish.jersey.core</groupId> <artifactId>jersey-common</artifactId> <version>4.0.0-M2</version> </dependency>
<?xml version="1.0" encoding="UTF-8"?> <!-- Copyright (c) 2010, 2025 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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.glassfish.jersey</groupId> <artifactId>project</artifactId> <version>4.0.0-M2</version> </parent> <groupId>org.glassfish.jersey.core</groupId> <artifactId>jersey-common</artifactId> <packaging>jar</packaging> <name>jersey-core-common</name> <description>Jersey core common packages</description> <licenses> <license> <name>EPL 2.0</name> <url>http://www.eclipse.org/legal/epl-2.0</url> <distribution>repo</distribution> <comments>Except for Guava, JSR-166 files, Dropwizard Monitoring inspired classes, ASM and Jackson JAX-RS Providers. See also https://github.com/eclipse-ee4j/jersey/blob/master/NOTICE.md</comments> </license> <license> <name>The GNU General Public License (GPL), Version 2, With Classpath Exception</name> <url>https://www.gnu.org/software/classpath/license.html</url> <distribution>repo</distribution> <comments>Except for Guava, and JSR-166 files. See also https://github.com/eclipse-ee4j/jersey/blob/master/NOTICE.md</comments> </license> <license> <name>Apache License, 2.0</name> <url>http://www.apache.org/licenses/LICENSE-2.0.html</url> <distribution>repo</distribution> <comments>Google Guava @ org.glassfish.jersey.internal.guava</comments> </license> <license> <name>Public Domain</name> <url>https://creativecommons.org/publicdomain/zero/1.0/</url> <distribution>repo</distribution> <comments>JSR-166 Extension to JEP 266 @ org.glassfish.jersey.internal.jsr166</comments> </license> </licenses> <build> <resources> <resource> <directory>${basedir}/src/main/resources</directory> <filtering>true</filtering> </resource> </resources> <testResources> <testResource> <directory>${basedir}/src/test/resources</directory> <filtering>true</filtering> </testResource> </testResources> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>${compiler.common.mvn.plugin.version}</version> <inherited>false</inherited> <configuration> <source>${java.version}</source> <target>${java.version}</target> <compilerArguments> <!-- Do not warn about using sun.misc.Unsafe --> <XDignore.symbol.file /> </compilerArguments> <showWarnings>false</showWarnings> <fork>false</fork> </configuration> </plugin> <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-jar-plugin</artifactId> <executions> <execution> <id>default-jar</id> <phase>package</phase> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <inherited>true</inherited> <extensions>true</extensions> <configuration> <instructions> <!-- Note: When you're changing these properties change them also in bundles/jaxrs-ri/pom.xml. --> <Import-Package> sun.misc.*;resolution:=optional, jakarta.activation.*;version="!";resolution:=optional, javax.imageio;resolution:=optional, javax.imageio.spi;resolution:=optional, javax.imageio.stream;resolution:=optional, jakarta.xml.bind;version="!";resolution:=optional, jakarta.xml.bind.annotation;version="!";resolution:=optional, jakarta.xml.bind.annotation.adapters;version="!";resolution:=optional, javax.xml.namespace;resolution:=optional, javax.xml.parsers;resolution:=optional, javax.xml.transform;resolution:=optional, javax.xml.transform.dom;resolution:=optional, javax.xml.transform.sax;resolution:=optional, javax.xml.transform.stream;resolution:=optional, org.w3c.dom;resolution:=optional, org.xml.sax;resolution:=optional, ${jakarta.annotation.osgi.version}, ${jakarta.rest.osgi.version}, * </Import-Package> <Bundle-ActivationPolicy>lazy</Bundle-ActivationPolicy> <Export-Package>org.glassfish.jersey.*;version=${project.version}</Export-Package> <Require-Capability>osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))"</Require-Capability> </instructions> <unpackBundle>true</unpackBundle> </configuration> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>buildnumber-maven-plugin</artifactId> <configuration> <format>{0,date,yyyy-MM-dd HH:mm:ss}</format> <items> <item>timestamp</item> </items> </configuration> <executions> <execution> <phase>validate</phase> <goals> <goal>create</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <executions> <execution> <id>default-test</id> <configuration> <excludes> <exclude>**/ByteBufferInputStreamTest.java</exclude> </excludes> </configuration> </execution> <execution> <id>tests-with-additional-permissions</id> <phase>test</phase> <goals> <goal>test</goal> </goals> <configuration> <argLine>-Djava.security.policy=${project.build.directory}/test-classes/surefire-jdk17.policy</argLine> <includes> <include>**/ByteBufferInputStreamTest.java</include> </includes> </configuration> </execution> </executions> <configuration> <!-- Execute test classes in parallel - 1 thread per CPU core. --> <parallel>classesAndMethods</parallel> <perCoreThreadCount>true</perCoreThreadCount> <threadCount>1</threadCount> </configuration> </plugin> </plugins> </build> <dependencies> <dependency> <groupId>jakarta.ws.rs</groupId> <artifactId>jakarta.ws.rs-api</artifactId> </dependency> <dependency> <groupId>jakarta.annotation</groupId> <artifactId>jakarta.annotation-api</artifactId> </dependency> <dependency> <groupId>org.eclipse.angus</groupId> <artifactId>angus-activation</artifactId> <scope>provided</scope> <optional>true</optional> </dependency> <dependency> <groupId>org.osgi</groupId> <artifactId>org.osgi.core</artifactId> <scope>provided</scope> </dependency> <dependency> <groupId>jakarta.inject</groupId> <artifactId>jakarta.inject-api</artifactId> </dependency> <dependency> <groupId>org.glassfish.hk2</groupId> <artifactId>osgi-resource-locator</artifactId> </dependency> <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.hamcrest</groupId> <artifactId>hamcrest</artifactId> <scope>test</scope> </dependency> </dependencies> <profiles> <profile> <id>build.jdk20-</id> <activation> <jdk>[11,21)</jdk> </activation> <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <executions> <execution> <id>add.java20-</id> <phase>generate-sources</phase> <goals> <goal>add-source</goal> </goals> <configuration> <sources> <source>src/main/java20-</source> </sources> </configuration> </execution> </executions> </plugin> </plugins> </build> </profile> <profile> <id>build.jdk21</id> <activation> <jdk>[21,)</jdk> </activation> <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <executions> <execution> <id>add.java20-</id> <phase>generate-sources</phase> <goals> <goal>add-source</goal> </goals> <configuration> <sources> <source>src/main/java21</source> </sources> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <executions> <execution> <id>default-compile</id> <configuration> <!-- compile everything to ensure module-info contains right entries --> <release>21</release> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <phase>validate</phase> <goals> <goal>run</goal> </goals> <configuration> <target> <echo>Building for JDK 21+</echo> </target> </configuration> </execution> <execution> <id>compile-java21</id> <phase>process-resources</phase> <configuration> <target> <mkdir dir="${java21.build.outputDirectory}" /> <javac srcdir="${java21.sourceDirectory}${path.separator}${project.basedir}/src/main/java/org/glassfish/jersey/innate/virtual" destdir="${java21.build.outputDirectory}" classpath="${project.build.outputDirectory}" includeantruntime="false" release="21"/> </target> </configuration> <goals> <goal>run</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </profile> <profile> <id>copyJDK21FilesToMultiReleaseJar</id> <activation> <file> <!-- ${java21.build.outputDirectory} does not work here --> <exists>target/classes-java21/org/glassfish/jersey/innate/VirtualThreadSupport.class</exists> </file> <jdk>[11,21)</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-jdk21-sources</id> <phase>prepare-package</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>${project.build.directory}/generated-sources/rsrc-gen/META-INF/versions/21/org/glassfish/jersey/innate</outputDirectory> <resources> <resource> <directory>${java21.sourceDirectory}/org/glassfish/jersey/innate</directory> </resource> </resources> </configuration> </execution> <execution> <id>copy-jdk21-classes-to-meta-inf</id> <phase>prepare-package</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>${project.build.outputDirectory}/META-INF/versions/21</outputDirectory> <resources> <resource> <directory>${java21.build.outputDirectory}</directory> </resource> </resources> </configuration> </execution> </executions> </plugin> </plugins> </build> </profile> <profile> <id>securityOff</id> <activation> <jdk>[24,)</jdk> </activation> <properties> <surefire.security.argline /> </properties> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <executions> <execution> <id>default-test</id> <configuration> <excludes> <exclude>**/SecurityManagerConfiguredTest.java</exclude> <exclude>**/ReflectionHelperTest.java</exclude> </excludes> </configuration> </execution> </executions> </plugin> </plugins> </build> </profile> <profile> <id>sonar</id> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <!-- disable parallel execution so that JaCoCo listener can properly work --> <parallel>none</parallel> <perCoreThreadCount>false</perCoreThreadCount> </configuration> </plugin> </plugins> </build> </profile> </profiles> <properties> <surefire.security.argline>-Djava.security.manager -Djava.security.policy=${project.build.directory}/test-classes/surefire.policy</surefire.security.argline> <java21.build.outputDirectory>${project.build.directory}/classes-java21</java21.build.outputDirectory> <java21.sourceDirectory>${project.basedir}/src/main/java21</java21.sourceDirectory> </properties> </project>