Remove dependency on jaxb-api2 compat package

This commit is contained in:
Chris Kelley 2023-02-06 11:18:14 +00:00
parent 55b7722c5d
commit 15800989bd
2 changed files with 46 additions and 3 deletions

View File

@ -0,0 +1,38 @@
From 54324baab4e5b79aa1a3481d107bcda850dee926 Mon Sep 17 00:00:00 2001
From: Chris Kelley <ckelley@redhat.com>
Date: Fri, 3 Feb 2023 20:01:09 +0000
Subject: [PATCH] Update to use jakarta.xml.bind package
---
src/main/java/javax/ws/rs/core/Link.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/main/java/javax/ws/rs/core/Link.java b/src/main/java/javax/ws/rs/core/Link.java
index 7265551..433ede9 100644
--- a/src/main/java/javax/ws/rs/core/Link.java
+++ b/src/main/java/javax/ws/rs/core/Link.java
@@ -47,9 +47,9 @@ import java.util.Map.Entry;
import javax.ws.rs.ext.RuntimeDelegate;
-import javax.xml.bind.annotation.XmlAnyAttribute;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.adapters.XmlAdapter;
+import jakarta.xml.bind.annotation.XmlAnyAttribute;
+import jakarta.xml.bind.annotation.XmlAttribute;
+import jakarta.xml.bind.annotation.adapters.XmlAdapter;
import javax.xml.namespace.QName;
/**
@@ -500,7 +500,7 @@ public abstract class Link {
}
/**
- * <p>An implementation of JAXB {@link javax.xml.bind.annotation.adapters.XmlAdapter}
+ * <p>An implementation of JAXB {@link jakarta.xml.bind.annotation.adapters.XmlAdapter}
* that maps the JAX-RS {@link javax.ws.rs.core.Link} type to a value that can be
* marshalled and unmarshalled by JAXB. The following example shows how to use
* this adapter on a JAXB bean class:</p>
--
2.39.0

View File

@ -4,17 +4,18 @@
Name: jboss-jaxrs-2.0-api
Version: 1.0.0
Release: 22%{?dist}
Release: 23%{?dist}
Summary: JAX-RS 2.0: The Java API for RESTful Web Services
# ASL 2.0 src/main/java/javax/ws/rs/core/GenericEntity.java
License: (CDDL or GPLv2 with exceptions) and ASL 2.0
URL: https://github.com/jboss/jboss-jaxrs-api_spec
Source0: https://github.com/jboss/jboss-jaxrs-api_spec/archive/%{oname}-%{namedversion}.tar.gz
Patch1: 0001-Update-to-use-jakarta.xml.bind-package.patch
BuildRequires: maven-local
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
BuildRequires: mvn(org.jboss:jboss-parent:pom:)
BuildRequires: mvn(jakarta.xml.bind:jakarta.xml.bind-api:2)
BuildRequires: mvn(jakarta.xml.bind:jakarta.xml.bind-api)
BuildArch: noarch
ExclusiveArch: %{java_arches} noarch
@ -24,12 +25,13 @@ JSR 339: JAX-RS 2.0: The Java API for RESTful Web Services.
%prep
%setup -q -n jboss-jaxrs-api_spec-%{oname}-%{namedversion}
%patch1 -p1
# Unneeded plugin
%pom_remove_plugin :maven-source-plugin
# Fix JDK11 build, add missing javax.xml.bind
%pom_add_dep jakarta.xml.bind:jakarta.xml.bind-api:2
%pom_add_dep jakarta.xml.bind:jakarta.xml.bind-api
%mvn_file :%{oname} %{name}
@ -46,6 +48,9 @@ JSR 339: JAX-RS 2.0: The Java API for RESTful Web Services.
%license LICENSE
%changelog
* Fri Feb 03 2023 Chris Kelley <ckelley@redhat.com> - 1.0.0-23
- Remove dependency on jaxb-api2 compat package
* Fri Jan 20 2023 Marian Koncek <mkoncek@redhat.com> - 1.0.0-22
- Depend on compat versions of activation and XML bind