From d1926a8f322f81f0969461d2ff9e5d8f0c74b20a Mon Sep 17 00:00:00 2001 From: Juan Manuel Leflet Estrada Date: Wed, 31 Jan 2024 13:07:36 +0100 Subject: [PATCH 1/3] [WINDUPRULE-1048] JSF to Qute rules --- .../quarkus/java-ee/cdi-to-quarkus.windup.xml | 156 +++++++++++- .../quarkus/java-ee/ee-to-quarkus.xml | 85 +++++++ .../quarkus/java-ee/jsf-to-qute.windup.xml | 227 ++++++++++++++++++ .../java-ee/persistence-to-quarkus.windup.xml | 137 +++++++++++ .../tests/cdi-to-quarkus.windup.test.xml | 54 ++++- .../tests/data-jakarta/direct/HelloEJB.java | 2 + .../src/main/java/sample/HelloService.java | 1 + .../tests/data/cdi-to-quarkus/beans.xml | 18 ++ .../data/ee-to-quarkus/HelloEJBJakartaEE.java | 12 + .../data/ee-to-quarkus/HelloEJBJavaEE.java | 12 + .../data/ee-to-quarkus/TransactionalBean.java | 9 + .../src/main/webapp/WEB-INF/beans.xml | 8 + .../data/jsf-to-qute/AuthController.java | 123 ++++++++++ .../tests/data/jsf-to-qute/faces-config.xml | 41 ++++ .../tests/data/jsf-to-qute/index.xhtml | 23 ++ .../java-ee/tests/data/jsf-to-qute/pom.xml | 106 ++++++++ .../PersistenceRelatedClass.java | 13 + .../persistence-to-quarkus/persistence.xml | 36 +++ .../tests/ee-to-quarkus.windup.test.xml | 48 ++++ .../javaee-pom-to-quarkus.windup.test.xml | 18 +- .../java-ee/tests/jsf-to-qute.windup.test.xml | 70 ++++++ .../persistence-to-quarkus.windup.test.xml | 36 +++ 22 files changed, 1210 insertions(+), 25 deletions(-) create mode 100644 rules/rules-reviewed/quarkus/java-ee/ee-to-quarkus.xml create mode 100644 rules/rules-reviewed/quarkus/java-ee/jsf-to-qute.windup.xml create mode 100644 rules/rules-reviewed/quarkus/java-ee/persistence-to-quarkus.windup.xml create mode 100644 rules/rules-reviewed/quarkus/java-ee/tests/data/cdi-to-quarkus/beans.xml create mode 100644 rules/rules-reviewed/quarkus/java-ee/tests/data/ee-to-quarkus/HelloEJBJakartaEE.java create mode 100644 rules/rules-reviewed/quarkus/java-ee/tests/data/ee-to-quarkus/HelloEJBJavaEE.java create mode 100644 rules/rules-reviewed/quarkus/java-ee/tests/data/ee-to-quarkus/TransactionalBean.java create mode 100644 rules/rules-reviewed/quarkus/java-ee/tests/data/jsf-to-qute/AuthController.java create mode 100644 rules/rules-reviewed/quarkus/java-ee/tests/data/jsf-to-qute/faces-config.xml create mode 100644 rules/rules-reviewed/quarkus/java-ee/tests/data/jsf-to-qute/index.xhtml create mode 100644 rules/rules-reviewed/quarkus/java-ee/tests/data/jsf-to-qute/pom.xml create mode 100644 rules/rules-reviewed/quarkus/java-ee/tests/data/persistence-to-quarkus/PersistenceRelatedClass.java create mode 100644 rules/rules-reviewed/quarkus/java-ee/tests/data/persistence-to-quarkus/persistence.xml create mode 100644 rules/rules-reviewed/quarkus/java-ee/tests/ee-to-quarkus.windup.test.xml create mode 100755 rules/rules-reviewed/quarkus/java-ee/tests/jsf-to-qute.windup.test.xml create mode 100755 rules/rules-reviewed/quarkus/java-ee/tests/persistence-to-quarkus.windup.test.xml diff --git a/rules/rules-reviewed/quarkus/java-ee/cdi-to-quarkus.windup.xml b/rules/rules-reviewed/quarkus/java-ee/cdi-to-quarkus.windup.xml index 546583506..02094c5f9 100644 --- a/rules/rules-reviewed/quarkus/java-ee/cdi-to-quarkus.windup.xml +++ b/rules/rules-reviewed/quarkus/java-ee/cdi-to-quarkus.windup.xml @@ -48,20 +48,150 @@ - - - + + + + + + + + - - - - `beans.xml` descriptor content is ignored and it could be removed from the application. - Refer to the guide referenced below to check the supported CDI feature in Quarkus. - - - - + + + `beans.xml` descriptor content is ignored by Quarkus and can be removed from the application. + Refer to the guide referenced below to check the supported CDI feature in Quarkus. + + + + + + + + + + + + + + + + + + + + + com.acme.intercept.TransactionInterceptor + + ``` + would turn into: + ``` + @Interceptor + public class TransactionInterceptor { ... } + ``` + ]]> + + + + + + + + + + + + + + + + + + + + + com.acme.decorate.BigAccountDecorator + + ``` + would turn into: + ``` + @Decorator + public class BigAccountDecorator { ... } + ``` + ]]> + + + + + + + + + + + + + + + + + + + + + + com.acme.decorate.BigAccountDecorator + + ``` + would turn into: + ``` + @Decorator + public class BigAccountDecorator { ... } + ``` + ]]> + + + + + + + + + + + + + + + + + + + + `beans.xml` descriptor content is ignored by Quarkus. The `bean-discovery-mode` attribute must be + taken into account when migrating to Quarkus in the following manner: + - ANNOTATED: no change in annotations; this is Quarkus' default (only pick up beans with bean-discovery annotations) + - ALL: all classes with bean-defining annotations are picked up, but also any class that meets the requirements + for a managed bean is picked up and given the default `@Dependent` scope (see links below) + + Refer to the guide referenced below to check the supported CDI feature in Quarkus. + + + + @@ -72,7 +202,7 @@ - In Quarkus, you can skip the @Produces annotation completely if the producer method is annotated with a scope annotation, a stereotype or a qualifier.. + In Quarkus, you can skip the @Produces annotation completely if the producer method is annotated with a scope annotation, a stereotype or a qualifier. This field could be accessed using a `@Named` getter method instead. diff --git a/rules/rules-reviewed/quarkus/java-ee/ee-to-quarkus.xml b/rules/rules-reviewed/quarkus/java-ee/ee-to-quarkus.xml new file mode 100644 index 000000000..c543ccbdb --- /dev/null +++ b/rules/rules-reviewed/quarkus/java-ee/ee-to-quarkus.xml @@ -0,0 +1,85 @@ + + + + + This ruleset gives hints to migrate different EE related technologies (ie, EJB) to Quarkus. Applies for both javax and jakarta namespaces. + + + + + + + + + + + + + + + + ANNOTATION + + + ANNOTATION + + + + + + Stateless EJBs can be converted to a cdi bean by replacing the `@Stateless` annotation with a scope eg `@ApplicationScoped` + + + + + + + + + ANNOTATION + + + ANNOTATION + + + + + + + Stateful EJBs can be converted to a CDI bean by replacing the `@Stateful` annotation with a bean-defining annotation + that encompasses the appropriate scope (e.g., `@ApplicationScoped`). `@Stateful` EJBs often translate to `@SessionScoped` + beans (a scope which requires activating the `quarkus-undertow` extension), but the appropriate scope may differ based + on your application architecture. Review your application's requirements to determine the appropriate scope. + + Note that it is recommended, as a good practice, to keep state external from the service in Quarkus. + + + + + + + + + + ANNOTATION + + + ANNOTATION + + + + + + + Any EJB method has container-manager transactions by default, with transaction attribute + `REQUIRED` as a default (a transaction is started if one is not already in progress). Methods that were part of + an EJB bean to be migrated to CDI must be annotated with `@Transactional`, or be marked as transactional + in any other way (i.e, by annotating the class). + + + + + + + diff --git a/rules/rules-reviewed/quarkus/java-ee/jsf-to-qute.windup.xml b/rules/rules-reviewed/quarkus/java-ee/jsf-to-qute.windup.xml new file mode 100644 index 000000000..86ba75acb --- /dev/null +++ b/rules/rules-reviewed/quarkus/java-ee/jsf-to-qute.windup.xml @@ -0,0 +1,227 @@ + + + + + This ruleset gives hints to migrate from JMS to a reactive messaging model in Quarkus. + + + + + + + + + + + + + + + + + + + + + + + + + + io.quarkus + quarkus-qute + + + io.quarkus + quarkus-resteasy + + ``` + The JAX-RS API is used to serve up the rendered Qute templates. Take a look at the Qute Templating Engine link below to know more about how to use Qute. + ]]> + + + + + + + + + + + + + + + + + Usage of JSF is not supported in Quarkus. All references to `faces` packages must be removed. + It is recommended to use Quarkus' Qute templating engine instead. + Take a look at the Qute Templating Engine link below to know more about how to use Qute. + + + + + + + + + + + ANNOTATION + + + ANNOTATION + + + + + + + The `@ConversationScoped` annotation is not supported by Quarkus. This can be substituted with another scope + depending on the application's requirements. Check the Bean Scopes Link below for more information. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JSF templates are not supported in Quarkus. We recommend using Qute instead. A Qute + template can be created for each corresponding JSF template, and the old xhtml JSF + templates should be removed. + + + + + + + + + + + + + + + + + ` messages, + and add any String values in there for display on the rendered template. + + Use `template.addData(“messages”, messages)` to use that list as part of the rendered template. + ]]> + + + + + + + + + + + + + + + + + The `faces-config.xml` file is no longer used and can be removed. + + + + + + + + + + + + + + + + + + ` can generally be replaced with `
`. Bear in mind that it may take multiple + `` tags to replace a single JSF ``, since redirection might happen to different endpoints + depending on the particular implementation; this is, form functionality can be split into several + smaller Qute forms. + + For instance, the JSF form: + ``` + +
+ Add Task + + + + + + + + +
+
+ ``` + could be translated into: + ``` + +
+ + + +
+ + ``` + ]]> +
+ + +
+
+
+ +
+
diff --git a/rules/rules-reviewed/quarkus/java-ee/persistence-to-quarkus.windup.xml b/rules/rules-reviewed/quarkus/java-ee/persistence-to-quarkus.windup.xml new file mode 100644 index 000000000..c4f3b3e40 --- /dev/null +++ b/rules/rules-reviewed/quarkus/java-ee/persistence-to-quarkus.windup.xml @@ -0,0 +1,137 @@ + + + + + This ruleset gives hints to migrate persistence related issues to Quarkus. Applies for both javax and jakarta namespaces. + + + + + + + + + + + + + + + + + + + + + + It is recommended to move persistence related configuration from an XML file to a properties one. + This allows centralization of the configuration in Quarkus. Check the link for more information. + + + + + + + + + + FIELD_DECLARATION + + + + + FIELD_DECLARATION + + + + + + + + + + + + + + + + + + + + + IMPORT + + + IMPORT + + + + + IMPORT + + + IMPORT + + + + + + + + + + + + + + + + + diff --git a/rules/rules-reviewed/quarkus/java-ee/tests/cdi-to-quarkus.windup.test.xml b/rules/rules-reviewed/quarkus/java-ee/tests/cdi-to-quarkus.windup.test.xml index e7825b563..8c514ea96 100644 --- a/rules/rules-reviewed/quarkus/java-ee/tests/cdi-to-quarkus.windup.test.xml +++ b/rules/rules-reviewed/quarkus/java-ee/tests/cdi-to-quarkus.windup.test.xml @@ -57,8 +57,8 @@ - - + + @@ -78,6 +78,54 @@
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -93,7 +141,7 @@ - + diff --git a/rules/rules-reviewed/quarkus/java-ee/tests/data-jakarta/direct/HelloEJB.java b/rules/rules-reviewed/quarkus/java-ee/tests/data-jakarta/direct/HelloEJB.java index e53a0805f..5dc4aaa38 100644 --- a/rules/rules-reviewed/quarkus/java-ee/tests/data-jakarta/direct/HelloEJB.java +++ b/rules/rules-reviewed/quarkus/java-ee/tests/data-jakarta/direct/HelloEJB.java @@ -1,6 +1,8 @@ import jakarta.ejb.Stateless; +import jakarta.ejb.Stateful; @Stateless +@Stateful public class HelloEJB { String createHelloMessage(String name) { diff --git a/rules/rules-reviewed/quarkus/java-ee/tests/data/application-javaee-api/src/main/java/sample/HelloService.java b/rules/rules-reviewed/quarkus/java-ee/tests/data/application-javaee-api/src/main/java/sample/HelloService.java index 85e935d1d..490d887f5 100644 --- a/rules/rules-reviewed/quarkus/java-ee/tests/data/application-javaee-api/src/main/java/sample/HelloService.java +++ b/rules/rules-reviewed/quarkus/java-ee/tests/data/application-javaee-api/src/main/java/sample/HelloService.java @@ -2,6 +2,7 @@ import javax.enterprise.context.Dependent; import javax.enterprise.inject.Produces; +import javax.ejb.Stateless; @Dependent public class HelloService { diff --git a/rules/rules-reviewed/quarkus/java-ee/tests/data/cdi-to-quarkus/beans.xml b/rules/rules-reviewed/quarkus/java-ee/tests/data/cdi-to-quarkus/beans.xml new file mode 100644 index 000000000..ad4e3f1d8 --- /dev/null +++ b/rules/rules-reviewed/quarkus/java-ee/tests/data/cdi-to-quarkus/beans.xml @@ -0,0 +1,18 @@ + + + + com.acme.intercept.SecurityInterceptor + com.acme.intercept.TransactionInterceptor + + + com.acme.decorate.BigAccountDecorator + com.acme.decorate.SpecialGiftDecorator + + + com.acme.business.MockPaymentProcessor + com.acme.stereotype.Mock + + \ No newline at end of file diff --git a/rules/rules-reviewed/quarkus/java-ee/tests/data/ee-to-quarkus/HelloEJBJakartaEE.java b/rules/rules-reviewed/quarkus/java-ee/tests/data/ee-to-quarkus/HelloEJBJakartaEE.java new file mode 100644 index 000000000..5dc4aaa38 --- /dev/null +++ b/rules/rules-reviewed/quarkus/java-ee/tests/data/ee-to-quarkus/HelloEJBJakartaEE.java @@ -0,0 +1,12 @@ +import jakarta.ejb.Stateless; +import jakarta.ejb.Stateful; + +@Stateless +@Stateful +public class HelloEJB { + + String createHelloMessage(String name) { + return "Hello " + name + "!"; + } + +} \ No newline at end of file diff --git a/rules/rules-reviewed/quarkus/java-ee/tests/data/ee-to-quarkus/HelloEJBJavaEE.java b/rules/rules-reviewed/quarkus/java-ee/tests/data/ee-to-quarkus/HelloEJBJavaEE.java new file mode 100644 index 000000000..2884ad723 --- /dev/null +++ b/rules/rules-reviewed/quarkus/java-ee/tests/data/ee-to-quarkus/HelloEJBJavaEE.java @@ -0,0 +1,12 @@ +import javax.ejb.Stateless; +import javax.ejb.Stateful; + +@Stateless +@Stateful +public class HelloEJB { + + String createHelloMessage(String name) { + return "Hello " + name + "!"; + } + +} \ No newline at end of file diff --git a/rules/rules-reviewed/quarkus/java-ee/tests/data/ee-to-quarkus/TransactionalBean.java b/rules/rules-reviewed/quarkus/java-ee/tests/data/ee-to-quarkus/TransactionalBean.java new file mode 100644 index 000000000..ea0bff933 --- /dev/null +++ b/rules/rules-reviewed/quarkus/java-ee/tests/data/ee-to-quarkus/TransactionalBean.java @@ -0,0 +1,9 @@ +import javax.ejb.Stateful; + +@Stateful +public class TransactionalBean { + + public String aTransactionalMethod(String str) { + return "Hello " + str; + } +} \ No newline at end of file diff --git a/rules/rules-reviewed/quarkus/java-ee/tests/data/helloworld-rs/src/main/webapp/WEB-INF/beans.xml b/rules/rules-reviewed/quarkus/java-ee/tests/data/helloworld-rs/src/main/webapp/WEB-INF/beans.xml index d3ddf148e..7d303eba4 100644 --- a/rules/rules-reviewed/quarkus/java-ee/tests/data/helloworld-rs/src/main/webapp/WEB-INF/beans.xml +++ b/rules/rules-reviewed/quarkus/java-ee/tests/data/helloworld-rs/src/main/webapp/WEB-INF/beans.xml @@ -21,4 +21,12 @@ http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd" bean-discovery-mode="all"> + + com.acme.intercept.SecurityInterceptor + com.acme.intercept.TransactionInterceptor + + + com.acme.decorate.BigAccountDecorator + com.acme.decorate.SpecialGiftDecorator + diff --git a/rules/rules-reviewed/quarkus/java-ee/tests/data/jsf-to-qute/AuthController.java b/rules/rules-reviewed/quarkus/java-ee/tests/data/jsf-to-qute/AuthController.java new file mode 100644 index 000000000..4f2030432 --- /dev/null +++ b/rules/rules-reviewed/quarkus/java-ee/tests/data/jsf-to-qute/AuthController.java @@ -0,0 +1,123 @@ +/* + * 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 org.jboss.as.quickstarts.tasksJsf; + +import javax.enterprise.context.Conversation; +import javax.enterprise.context.RequestScoped; +import javax.enterprise.inject.Produces; +import javax.faces.application.FacesMessage; +import javax.faces.context.FacesContext; +import javax.inject.Inject; +import javax.inject.Named; + +/** + * Provides authentication operations with current user store: {@link Authentication}. + * + * @author Lukas Fryc + * + */ +@Named +@RequestScoped +public class AuthController { + + @Inject + private Authentication authentication; + + @Inject + private UserDao userDao; + + @Inject + private FacesContext facesContext; + + @Inject + private Conversation conversation; + + /** + *

+ * Provides current user to the context available for injection using: + *

+ * + *

+ * @Inject @CurrentUser currentUser; + *

+ * + *

+ * or from the Expression Language context using an expression #{currentUser}. + *

+ * + * @return current authenticated user + */ + @Produces + @Named + @CurrentUser + public User getCurrentUser() { + return authentication.getCurrentUser(); + } + + /** + *

+ * Authenticates current user with 'username' against user data store + *

+ * + *

+ * Starts the new conversation. + *

+ * + * @param username the username of the user to authenticate + */ + public void authenticate(String username) { + if (isLogged()) { + throw new IllegalStateException("User is logged and tries to authenticate again"); + } + + User user = userDao.getForUsername(username); + if (user == null) { + user = createUser(username); + } + authentication.setCurrentUser(user); + conversation.begin(); + } + + /** + * Logs current user out and ends the current conversation. + */ + public void logout() { + authentication.setCurrentUser(null); + conversation.end(); + } + + /** + * Returns true if user is logged in + * + * @return true if user is logged in; false otherwise + */ + public boolean isLogged() { + return authentication.getCurrentUser() != null; + } + + private User createUser(String username) { + try { + User user = new User(username); + userDao.createUser(user); + facesContext.addMessage(null, new FacesMessage("User successfully created")); + return user; + } catch (Exception e) { + facesContext.addMessage(null, new FacesMessage("Failed to create user '" + username + "'", e.getMessage())); + return null; + } + } +} diff --git a/rules/rules-reviewed/quarkus/java-ee/tests/data/jsf-to-qute/faces-config.xml b/rules/rules-reviewed/quarkus/java-ee/tests/data/jsf-to-qute/faces-config.xml new file mode 100644 index 000000000..0dd296f5b --- /dev/null +++ b/rules/rules-reviewed/quarkus/java-ee/tests/data/jsf-to-qute/faces-config.xml @@ -0,0 +1,41 @@ + + + + + + /index.xhtml + + #{authController.authenticate(username)} + #{authController.logged} + /tasks.xhtml + + + + + + /tasks.xhtml + + #{authController.logout} + #{!authController.logged} + /index.xhtml + + + + + diff --git a/rules/rules-reviewed/quarkus/java-ee/tests/data/jsf-to-qute/index.xhtml b/rules/rules-reviewed/quarkus/java-ee/tests/data/jsf-to-qute/index.xhtml new file mode 100644 index 000000000..5350d4ed7 --- /dev/null +++ b/rules/rules-reviewed/quarkus/java-ee/tests/data/jsf-to-qute/index.xhtml @@ -0,0 +1,23 @@ + + + + + tasks-jsf + + + +

Tasks - Authentication

+ + + + + + + + + + +
+ + \ No newline at end of file diff --git a/rules/rules-reviewed/quarkus/java-ee/tests/data/jsf-to-qute/pom.xml b/rules/rules-reviewed/quarkus/java-ee/tests/data/jsf-to-qute/pom.xml new file mode 100644 index 000000000..436fd580f --- /dev/null +++ b/rules/rules-reviewed/quarkus/java-ee/tests/data/jsf-to-qute/pom.xml @@ -0,0 +1,106 @@ + + + + 4.0.0 + + org.jboss.eap.quickstarts + quickstart-parent + + 7.4.0.GA + ../pom.xml + + + tasks-jsf + war + Quickstart: tasks-jsf + This project demonstrates how to use JPA persistence to manage tasks with JSF as view layer + + + + Apache License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.html + repo + + + + + + + + jakarta.enterprise + jakarta.enterprise.cdi-api + provided + + + + + junit + junit + test + + + + + jakarta.persistence + jakarta.persistence-api + provided + + + + org.jboss.arquillian.junit + arquillian-junit-container + test + + + + org.jboss.arquillian.protocol + arquillian-protocol-servlet + test + + + + + org.jboss.spec.javax.ejb + jboss-ejb-api_3.2_spec + provided + + + + + org.jboss.spec.javax.faces + jboss-jsf-api_2.3_spec + provided + + + + jakarta.faces + jakarta.faces-api + 4.0.1 + + + + + + + + ${project.artifactId} + + + diff --git a/rules/rules-reviewed/quarkus/java-ee/tests/data/persistence-to-quarkus/PersistenceRelatedClass.java b/rules/rules-reviewed/quarkus/java-ee/tests/data/persistence-to-quarkus/PersistenceRelatedClass.java new file mode 100644 index 000000000..b367b876a --- /dev/null +++ b/rules/rules-reviewed/quarkus/java-ee/tests/data/persistence-to-quarkus/PersistenceRelatedClass.java @@ -0,0 +1,13 @@ +import javax.enterprise.inject.Produces; +import javax.persistence.EntityManager; + +public class PersistenceRelatedClass { + + @Produces + private EntityManager entityManager; + + @Produces + public EntityManager getEntityManager() { + return entityManager; + } +} \ No newline at end of file diff --git a/rules/rules-reviewed/quarkus/java-ee/tests/data/persistence-to-quarkus/persistence.xml b/rules/rules-reviewed/quarkus/java-ee/tests/data/persistence-to-quarkus/persistence.xml new file mode 100644 index 000000000..5b08c01d0 --- /dev/null +++ b/rules/rules-reviewed/quarkus/java-ee/tests/data/persistence-to-quarkus/persistence.xml @@ -0,0 +1,36 @@ + + + + + + + java:jboss/datasources/TasksJsfQuickstartDS + + + + + + + diff --git a/rules/rules-reviewed/quarkus/java-ee/tests/ee-to-quarkus.windup.test.xml b/rules/rules-reviewed/quarkus/java-ee/tests/ee-to-quarkus.windup.test.xml new file mode 100644 index 000000000..97334921f --- /dev/null +++ b/rules/rules-reviewed/quarkus/java-ee/tests/ee-to-quarkus.windup.test.xml @@ -0,0 +1,48 @@ + + + data/ee-to-quarkus + ../ee-to-quarkus.windup.xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rules/rules-reviewed/quarkus/java-ee/tests/javaee-pom-to-quarkus.windup.test.xml b/rules/rules-reviewed/quarkus/java-ee/tests/javaee-pom-to-quarkus.windup.test.xml index fcaa0a520..0b040e42a 100644 --- a/rules/rules-reviewed/quarkus/java-ee/tests/javaee-pom-to-quarkus.windup.test.xml +++ b/rules/rules-reviewed/quarkus/java-ee/tests/javaee-pom-to-quarkus.windup.test.xml @@ -10,7 +10,7 @@ - + @@ -22,7 +22,7 @@ - + @@ -34,7 +34,7 @@ - + @@ -46,7 +46,7 @@ - + @@ -58,7 +58,7 @@ - + @@ -70,7 +70,7 @@ - + @@ -82,7 +82,7 @@ - + @@ -94,7 +94,7 @@ - + @@ -106,7 +106,7 @@ - + diff --git a/rules/rules-reviewed/quarkus/java-ee/tests/jsf-to-qute.windup.test.xml b/rules/rules-reviewed/quarkus/java-ee/tests/jsf-to-qute.windup.test.xml new file mode 100755 index 000000000..e9d5b2975 --- /dev/null +++ b/rules/rules-reviewed/quarkus/java-ee/tests/jsf-to-qute.windup.test.xml @@ -0,0 +1,70 @@ + + + data/jsf-to-qute + ../jsf-to-qute.windup.xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rules/rules-reviewed/quarkus/java-ee/tests/persistence-to-quarkus.windup.test.xml b/rules/rules-reviewed/quarkus/java-ee/tests/persistence-to-quarkus.windup.test.xml new file mode 100755 index 000000000..7cecb86cc --- /dev/null +++ b/rules/rules-reviewed/quarkus/java-ee/tests/persistence-to-quarkus.windup.test.xml @@ -0,0 +1,36 @@ + + + data/persistence-to-quarkus + ../persistence-to-quarkus.windup.xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 6a885aaa7f2fd293163aff3d348e414bf092c087 Mon Sep 17 00:00:00 2001 From: Juan Manuel Leflet Estrada Date: Thu, 1 Feb 2024 17:20:25 +0100 Subject: [PATCH 2/3] Fix tests Signed-off-by: Juan Manuel Leflet Estrada --- .../quarkus/java-ee/tests/cdi-to-quarkus.windup.test.xml | 6 +++--- .../tests/dependency-removal-for-quarkus.windup.test.xml | 2 +- .../quarkus/java-ee/tests/ee-to-quarkus.windup.test.xml | 8 ++++---- .../java-ee/tests/javaee-faces-to-quarkus.windup.test.xml | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/rules/rules-reviewed/quarkus/java-ee/tests/cdi-to-quarkus.windup.test.xml b/rules/rules-reviewed/quarkus/java-ee/tests/cdi-to-quarkus.windup.test.xml index 8c514ea96..4ad1d0c29 100644 --- a/rules/rules-reviewed/quarkus/java-ee/tests/cdi-to-quarkus.windup.test.xml +++ b/rules/rules-reviewed/quarkus/java-ee/tests/cdi-to-quarkus.windup.test.xml @@ -69,7 +69,7 @@ - + @@ -129,8 +129,8 @@ - - + + diff --git a/rules/rules-reviewed/quarkus/java-ee/tests/dependency-removal-for-quarkus.windup.test.xml b/rules/rules-reviewed/quarkus/java-ee/tests/dependency-removal-for-quarkus.windup.test.xml index 35f0d75bc..7a91984ca 100644 --- a/rules/rules-reviewed/quarkus/java-ee/tests/dependency-removal-for-quarkus.windup.test.xml +++ b/rules/rules-reviewed/quarkus/java-ee/tests/dependency-removal-for-quarkus.windup.test.xml @@ -10,7 +10,7 @@ - + diff --git a/rules/rules-reviewed/quarkus/java-ee/tests/ee-to-quarkus.windup.test.xml b/rules/rules-reviewed/quarkus/java-ee/tests/ee-to-quarkus.windup.test.xml index 97334921f..a9e886f9e 100644 --- a/rules/rules-reviewed/quarkus/java-ee/tests/ee-to-quarkus.windup.test.xml +++ b/rules/rules-reviewed/quarkus/java-ee/tests/ee-to-quarkus.windup.test.xml @@ -16,13 +16,13 @@
- +
- + @@ -35,12 +35,12 @@ - + - + diff --git a/rules/rules-reviewed/quarkus/java-ee/tests/javaee-faces-to-quarkus.windup.test.xml b/rules/rules-reviewed/quarkus/java-ee/tests/javaee-faces-to-quarkus.windup.test.xml index 78f23c83b..939318d16 100644 --- a/rules/rules-reviewed/quarkus/java-ee/tests/javaee-faces-to-quarkus.windup.test.xml +++ b/rules/rules-reviewed/quarkus/java-ee/tests/javaee-faces-to-quarkus.windup.test.xml @@ -10,7 +10,7 @@ - + From c9e7f32a358e6fe7b425730c0247bc66433ead39 Mon Sep 17 00:00:00 2001 From: Juan Manuel Leflet Estrada Date: Tue, 13 Feb 2024 18:07:46 +0100 Subject: [PATCH 3/3] [WINDUPRULE-1048] Fix tests --- .../{ee-to-quarkus.xml => ee-to-quarkus.windup.xml} | 4 ++-- .../java-ee/tests/ee-to-quarkus.windup.test.xml | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) rename rules/rules-reviewed/quarkus/java-ee/{ee-to-quarkus.xml => ee-to-quarkus.windup.xml} (96%) diff --git a/rules/rules-reviewed/quarkus/java-ee/ee-to-quarkus.xml b/rules/rules-reviewed/quarkus/java-ee/ee-to-quarkus.windup.xml similarity index 96% rename from rules/rules-reviewed/quarkus/java-ee/ee-to-quarkus.xml rename to rules/rules-reviewed/quarkus/java-ee/ee-to-quarkus.windup.xml index c543ccbdb..929ab8dde 100644 --- a/rules/rules-reviewed/quarkus/java-ee/ee-to-quarkus.xml +++ b/rules/rules-reviewed/quarkus/java-ee/ee-to-quarkus.windup.xml @@ -28,7 +28,7 @@ - Stateless EJBs can be converted to a cdi bean by replacing the `@Stateless` annotation with a scope eg `@ApplicationScoped` + Stateless EJBs can be converted to a CDI bean by replacing the `@Stateless` annotation with a scope eg `@ApplicationScoped` @@ -70,7 +70,7 @@ - + Any EJB method has container-manager transactions by default, with transaction attribute `REQUIRED` as a default (a transaction is started if one is not already in progress). Methods that were part of diff --git a/rules/rules-reviewed/quarkus/java-ee/tests/ee-to-quarkus.windup.test.xml b/rules/rules-reviewed/quarkus/java-ee/tests/ee-to-quarkus.windup.test.xml index a9e886f9e..6edb7d414 100644 --- a/rules/rules-reviewed/quarkus/java-ee/tests/ee-to-quarkus.windup.test.xml +++ b/rules/rules-reviewed/quarkus/java-ee/tests/ee-to-quarkus.windup.test.xml @@ -11,7 +11,7 @@ - + @@ -19,11 +19,11 @@ - + - + @@ -31,11 +31,11 @@ - + - - + +