diff --git a/rules/rules-reviewed/quarkus/java-ee/jakarta-jaxrs-to-quarkus.windup.xml b/rules/rules-reviewed/quarkus/java-ee/jakarta-jaxrs-to-quarkus.windup.xml new file mode 100644 index 000000000..b7c8c99a5 --- /dev/null +++ b/rules/rules-reviewed/quarkus/java-ee/jakarta-jaxrs-to-quarkus.windup.xml @@ -0,0 +1,51 @@ + + + + + This ruleset gives hints to migrate JAX-RS applications to Quarkus extension + + + + + + + + + + + + + + + + + + Dependency `jakarta.ws.rs:jakarta.ws.rs-api` has to be replaced with `io.quarkus:quarkus-resteasy-reactive` artifact. + + + + + + + + + + ANNOTATION + + + INHERITANCE + + + + + + + Jakarta JAX-RS activation is no longer necessary. You can set a root path like this but you don't have to. + + + + + + + diff --git a/rules/rules-reviewed/quarkus/java-ee/tests/data/application-jakarta-api/pom.xml b/rules/rules-reviewed/quarkus/java-ee/tests/data/application-jakarta-api/pom.xml index 91e1d91aa..9e609912c 100644 --- a/rules/rules-reviewed/quarkus/java-ee/tests/data/application-jakarta-api/pom.xml +++ b/rules/rules-reviewed/quarkus/java-ee/tests/data/application-jakarta-api/pom.xml @@ -49,6 +49,11 @@ 9.0.0 provided + + jakarta.ws.rs + jakarta.ws.rs-api + 3.1.0 + jakarta.faces jakarta.faces-api diff --git a/rules/rules-reviewed/quarkus/java-ee/tests/data/application-jakarta-api/src/main/java/sample/JAXActivator.java b/rules/rules-reviewed/quarkus/java-ee/tests/data/application-jakarta-api/src/main/java/sample/JAXActivator.java new file mode 100644 index 000000000..73369b935 --- /dev/null +++ b/rules/rules-reviewed/quarkus/java-ee/tests/data/application-jakarta-api/src/main/java/sample/JAXActivator.java @@ -0,0 +1,30 @@ +/** + * JBoss, Home of Professional Open Source + * Copyright 2015, Red Hat, Inc. and/or its affiliates, and individual + * contributors by the @authors tag. See the copyright.txt in the + * distribution for a full listing of individual contributors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package jakarta.quickstarts.rshelloworld; + +import jakarta.ws.rs.ApplicationPath; +import jakarta.ws.rs.core.Application; + +/** + * JAXActivator is an arbitrary name, what is important is that jakarta.ws.rs.core.Application is extended + * and the @ApplicationPath annotation is used with a "rest" path. Without this the rest routes linked to + * from index.html would not be found. + */ +@ApplicationPath("rest") +public class JAXActivator extends Application { + // Left empty intentionally +} diff --git a/rules/rules-reviewed/quarkus/java-ee/tests/jakarta-jaxrs-to-quarkus.windup.test.xml b/rules/rules-reviewed/quarkus/java-ee/tests/jakarta-jaxrs-to-quarkus.windup.test.xml new file mode 100644 index 000000000..8ea7f7be2 --- /dev/null +++ b/rules/rules-reviewed/quarkus/java-ee/tests/jakarta-jaxrs-to-quarkus.windup.test.xml @@ -0,0 +1,36 @@ + + + data/application-jakarta-api/* + ../jakarta-jaxrs-to-quarkus.windup.xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + +