Migrate the kubernetes demo to Quarkus 3 (#567)
* Update quarkus-artemis-jms
* Migrate the kubernetes demo to Quarkus 3
---------
Co-authored-by: Radovan Synek <rsynek@redhat.com>
diff --git a/pom.xml b/pom.xml
index bfb3ed5..238258b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -39,10 +39,9 @@
<name>!productized</name>
</property>
</activation>
- <!-- TODO: enable after migrating the quickstart to Quarkus 3. -->
-<!-- <modules>
+ <modules>
<module>technology/kubernetes</module>
- </modules>-->
+ </modules>
</profile>
<profile>
diff --git a/technology/java-activemq-quarkus/pom.xml b/technology/java-activemq-quarkus/pom.xml
index c78d0bb..0113beb 100644
--- a/technology/java-activemq-quarkus/pom.xml
+++ b/technology/java-activemq-quarkus/pom.xml
@@ -47,8 +47,7 @@
<dependency>
<groupId>io.quarkiverse.artemis</groupId>
<artifactId>quarkus-artemis-jms</artifactId>
- <!-- TODO: upgrade to Final when it's available. -->
- <version>3.0.0.CR1</version>
+ <version>3.0.0</version>
</dependency>
<dependency>
<groupId>org.acme</groupId>
diff --git a/technology/kubernetes/common/src/main/java/org/acme/common/domain/AbstractPersistable.java b/technology/kubernetes/common/src/main/java/org/acme/common/domain/AbstractPersistable.java
index 7d01e49..9abb918 100644
--- a/technology/kubernetes/common/src/main/java/org/acme/common/domain/AbstractPersistable.java
+++ b/technology/kubernetes/common/src/main/java/org/acme/common/domain/AbstractPersistable.java
@@ -1,8 +1,8 @@
package org.acme.common.domain;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.MappedSuperclass;
+import jakarta.persistence.GeneratedValue;
+import jakarta.persistence.Id;
+import jakarta.persistence.MappedSuperclass;
import org.optaplanner.core.api.domain.lookup.PlanningId;
diff --git a/technology/kubernetes/common/src/main/java/org/acme/common/domain/Lesson.java b/technology/kubernetes/common/src/main/java/org/acme/common/domain/Lesson.java
index 1869a8b..3b10237 100644
--- a/technology/kubernetes/common/src/main/java/org/acme/common/domain/Lesson.java
+++ b/technology/kubernetes/common/src/main/java/org/acme/common/domain/Lesson.java
@@ -1,7 +1,7 @@
package org.acme.common.domain;
-import javax.persistence.Entity;
-import javax.persistence.ManyToOne;
+import jakarta.persistence.Entity;
+import jakarta.persistence.ManyToOne;
import org.optaplanner.core.api.domain.entity.PlanningEntity;
import org.optaplanner.core.api.domain.variable.PlanningVariable;
diff --git a/technology/kubernetes/common/src/main/java/org/acme/common/domain/Room.java b/technology/kubernetes/common/src/main/java/org/acme/common/domain/Room.java
index b5d4ea7..43e3afa 100644
--- a/technology/kubernetes/common/src/main/java/org/acme/common/domain/Room.java
+++ b/technology/kubernetes/common/src/main/java/org/acme/common/domain/Room.java
@@ -1,6 +1,6 @@
package org.acme.common.domain;
-import javax.persistence.Entity;
+import jakarta.persistence.Entity;
@Entity
public class Room extends AbstractPersistable {
diff --git a/technology/kubernetes/common/src/main/java/org/acme/common/domain/Timeslot.java b/technology/kubernetes/common/src/main/java/org/acme/common/domain/Timeslot.java
index 1bcfb59..af0aed3 100644
--- a/technology/kubernetes/common/src/main/java/org/acme/common/domain/Timeslot.java
+++ b/technology/kubernetes/common/src/main/java/org/acme/common/domain/Timeslot.java
@@ -3,7 +3,7 @@
import java.time.DayOfWeek;
import java.time.LocalTime;
-import javax.persistence.Entity;
+import jakarta.persistence.Entity;
@Entity
public class Timeslot extends AbstractPersistable {
diff --git a/technology/kubernetes/common/src/main/java/org/acme/common/persistence/LessonRepository.java b/technology/kubernetes/common/src/main/java/org/acme/common/persistence/LessonRepository.java
index 6415837..e4e2b9a 100644
--- a/technology/kubernetes/common/src/main/java/org/acme/common/persistence/LessonRepository.java
+++ b/technology/kubernetes/common/src/main/java/org/acme/common/persistence/LessonRepository.java
@@ -2,7 +2,7 @@
import java.util.List;
-import javax.enterprise.context.ApplicationScoped;
+import jakarta.enterprise.context.ApplicationScoped;
import org.acme.common.domain.Lesson;
diff --git a/technology/kubernetes/common/src/main/java/org/acme/common/persistence/RoomRepository.java b/technology/kubernetes/common/src/main/java/org/acme/common/persistence/RoomRepository.java
index 7852479..c9e53d8 100644
--- a/technology/kubernetes/common/src/main/java/org/acme/common/persistence/RoomRepository.java
+++ b/technology/kubernetes/common/src/main/java/org/acme/common/persistence/RoomRepository.java
@@ -2,7 +2,7 @@
import java.util.List;
-import javax.enterprise.context.ApplicationScoped;
+import jakarta.enterprise.context.ApplicationScoped;
import org.acme.common.domain.Room;
diff --git a/technology/kubernetes/common/src/main/java/org/acme/common/persistence/TimeTableRepository.java b/technology/kubernetes/common/src/main/java/org/acme/common/persistence/TimeTableRepository.java
index 21f76cf..4ba451d 100644
--- a/technology/kubernetes/common/src/main/java/org/acme/common/persistence/TimeTableRepository.java
+++ b/technology/kubernetes/common/src/main/java/org/acme/common/persistence/TimeTableRepository.java
@@ -1,8 +1,8 @@
package org.acme.common.persistence;
-import javax.enterprise.context.ApplicationScoped;
-import javax.inject.Inject;
-import javax.transaction.Transactional;
+import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.inject.Inject;
+import jakarta.transaction.Transactional;
import org.acme.common.domain.Lesson;
import org.acme.common.domain.TimeTable;
diff --git a/technology/kubernetes/common/src/main/java/org/acme/common/persistence/TimeslotRepository.java b/technology/kubernetes/common/src/main/java/org/acme/common/persistence/TimeslotRepository.java
index 37fb28b..c3d2fac 100644
--- a/technology/kubernetes/common/src/main/java/org/acme/common/persistence/TimeslotRepository.java
+++ b/technology/kubernetes/common/src/main/java/org/acme/common/persistence/TimeslotRepository.java
@@ -2,7 +2,7 @@
import java.util.List;
-import javax.enterprise.context.ApplicationScoped;
+import jakarta.enterprise.context.ApplicationScoped;
import org.acme.common.domain.Timeslot;
diff --git a/technology/kubernetes/demo-app/src/main/java/org/acme/demoapp/generator/DemoDataGenerator.java b/technology/kubernetes/demo-app/src/main/java/org/acme/demoapp/generator/DemoDataGenerator.java
index 6fd3de1..0249432 100644
--- a/technology/kubernetes/demo-app/src/main/java/org/acme/demoapp/generator/DemoDataGenerator.java
+++ b/technology/kubernetes/demo-app/src/main/java/org/acme/demoapp/generator/DemoDataGenerator.java
@@ -7,7 +7,7 @@
import java.util.List;
import java.util.Map;
-import javax.enterprise.context.ApplicationScoped;
+import jakarta.enterprise.context.ApplicationScoped;
import org.acme.common.domain.Lesson;
import org.acme.common.domain.Room;
diff --git a/technology/kubernetes/demo-app/src/main/java/org/acme/demoapp/rest/DemoDataResource.java b/technology/kubernetes/demo-app/src/main/java/org/acme/demoapp/rest/DemoDataResource.java
index cf756f4..23e2d4c 100644
--- a/technology/kubernetes/demo-app/src/main/java/org/acme/demoapp/rest/DemoDataResource.java
+++ b/technology/kubernetes/demo-app/src/main/java/org/acme/demoapp/rest/DemoDataResource.java
@@ -7,13 +7,13 @@
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicLong;
-import javax.inject.Inject;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
+import jakarta.inject.Inject;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.core.MediaType;
import org.acme.common.domain.TimeTable;
import org.acme.common.message.SolverRequest;
diff --git a/technology/kubernetes/demo-app/src/main/java/org/acme/demoapp/rest/EventResource.java b/technology/kubernetes/demo-app/src/main/java/org/acme/demoapp/rest/EventResource.java
index b67df8a..32a60f5 100644
--- a/technology/kubernetes/demo-app/src/main/java/org/acme/demoapp/rest/EventResource.java
+++ b/technology/kubernetes/demo-app/src/main/java/org/acme/demoapp/rest/EventResource.java
@@ -2,16 +2,17 @@
import java.util.UUID;
-import javax.annotation.PreDestroy;
-import javax.enterprise.context.ApplicationScoped;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.sse.Sse;
-import javax.ws.rs.sse.SseBroadcaster;
-import javax.ws.rs.sse.SseEventSink;
+import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.core.Context;
+import jakarta.ws.rs.core.MediaType;
+import jakarta.ws.rs.sse.Sse;
+import jakarta.ws.rs.sse.SseBroadcaster;
+import jakarta.ws.rs.sse.SseEventSink;
+
+import jakarta.annotation.PreDestroy;
@Path("events")
@ApplicationScoped
diff --git a/technology/kubernetes/demo-app/src/test/java/org/acme/demoapp/InMemoryBrokerLifecycleManager.java b/technology/kubernetes/demo-app/src/test/java/org/acme/demoapp/InMemoryBrokerLifecycleManager.java
index 3237a68..8e21fc8 100644
--- a/technology/kubernetes/demo-app/src/test/java/org/acme/demoapp/InMemoryBrokerLifecycleManager.java
+++ b/technology/kubernetes/demo-app/src/test/java/org/acme/demoapp/InMemoryBrokerLifecycleManager.java
@@ -4,7 +4,8 @@
import java.util.Map;
import io.quarkus.test.common.QuarkusTestResourceLifecycleManager;
-import io.smallrye.reactive.messaging.providers.connectors.InMemoryConnector;
+
+import io.smallrye.reactive.messaging.memory.InMemoryConnector;
public class InMemoryBrokerLifecycleManager implements QuarkusTestResourceLifecycleManager {
diff --git a/technology/kubernetes/demo-app/src/test/java/org/acme/demoapp/rest/DemoDataResourceTest.java b/technology/kubernetes/demo-app/src/test/java/org/acme/demoapp/rest/DemoDataResourceTest.java
index 259d3a1..4114c6b 100644
--- a/technology/kubernetes/demo-app/src/test/java/org/acme/demoapp/rest/DemoDataResourceTest.java
+++ b/technology/kubernetes/demo-app/src/test/java/org/acme/demoapp/rest/DemoDataResourceTest.java
@@ -2,8 +2,8 @@
import static org.assertj.core.api.Assertions.assertThat;
-import javax.enterprise.inject.Any;
-import javax.inject.Inject;
+import jakarta.enterprise.inject.Any;
+import jakarta.inject.Inject;
import org.acme.common.domain.TimeTable;
import org.acme.common.message.SolverRequest;
@@ -18,8 +18,8 @@
import io.quarkus.test.common.QuarkusTestResource;
import io.quarkus.test.junit.QuarkusTest;
-import io.smallrye.reactive.messaging.providers.connectors.InMemoryConnector;
-import io.smallrye.reactive.messaging.providers.connectors.InMemorySink;
+import io.smallrye.reactive.messaging.memory.InMemoryConnector;
+import io.smallrye.reactive.messaging.memory.InMemorySink;
@QuarkusTest
@QuarkusTestResource(InMemoryBrokerLifecycleManager.class)
diff --git a/technology/kubernetes/pom.xml b/technology/kubernetes/pom.xml
index c0ff0d8..32119e0 100644
--- a/technology/kubernetes/pom.xml
+++ b/technology/kubernetes/pom.xml
@@ -19,9 +19,9 @@
<maven.compiler.release>11</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <version.org.apache.activemq>2.24.0</version.org.apache.activemq>
- <version.io.quarkus>2.16.6.Final</version.io.quarkus>
- <version.org.optaplanner>8.38.0-SNAPSHOT</version.org.optaplanner>
+ <version.org.apache.activemq>2.28.0</version.org.apache.activemq>
+ <version.io.quarkus>3.0.0.Final</version.io.quarkus>
+ <version.org.optaplanner>9.39.0-SNAPSHOT</version.org.optaplanner>
<version.compiler.plugin>3.8.1</version.compiler.plugin>
<version.jandex.plugin>1.0.8</version.jandex.plugin>
<version.surefire.plugin>3.0.0-M8</version.surefire.plugin>
@@ -46,7 +46,7 @@
<dependency>
<groupId>org.amqphub.quarkus</groupId>
<artifactId>quarkus-qpid-jms</artifactId>
- <version>0.36.0</version>
+ <version>2.1.0</version>
</dependency>
<dependency>
<groupId>org.acme</groupId>
diff --git a/technology/kubernetes/school-timetabling/src/main/java/org/acme/schooltimetabling/messaging/MessageHandler.java b/technology/kubernetes/school-timetabling/src/main/java/org/acme/schooltimetabling/messaging/MessageHandler.java
index 7298700..64848d0 100644
--- a/technology/kubernetes/school-timetabling/src/main/java/org/acme/schooltimetabling/messaging/MessageHandler.java
+++ b/technology/kubernetes/school-timetabling/src/main/java/org/acme/schooltimetabling/messaging/MessageHandler.java
@@ -3,15 +3,15 @@
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
-import javax.enterprise.context.ApplicationScoped;
-import javax.enterprise.event.Observes;
-import javax.inject.Inject;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSConsumer;
-import javax.jms.JMSContext;
-import javax.jms.JMSProducer;
-import javax.jms.Message;
-import javax.jms.Queue;
+import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.enterprise.event.Observes;
+import jakarta.inject.Inject;
+import jakarta.jms.ConnectionFactory;
+import jakarta.jms.JMSConsumer;
+import jakarta.jms.JMSContext;
+import jakarta.jms.JMSProducer;
+import jakarta.jms.Message;
+import jakarta.jms.Queue;
import org.acme.common.domain.TimeTable;
import org.acme.common.message.SolverRequest;
diff --git a/technology/kubernetes/school-timetabling/src/test/java/org/acme/schooltimetabling/messaging/MessageHandlerTest.java b/technology/kubernetes/school-timetabling/src/test/java/org/acme/schooltimetabling/messaging/MessageHandlerTest.java
index 961c3ca..e9f48cb 100644
--- a/technology/kubernetes/school-timetabling/src/test/java/org/acme/schooltimetabling/messaging/MessageHandlerTest.java
+++ b/technology/kubernetes/school-timetabling/src/test/java/org/acme/schooltimetabling/messaging/MessageHandlerTest.java
@@ -9,15 +9,15 @@
import java.time.LocalTime;
import java.util.List;
-import javax.inject.Inject;
-import javax.jms.ConnectionFactory;
-import javax.jms.Destination;
-import javax.jms.JMSConsumer;
-import javax.jms.JMSContext;
-import javax.jms.JMSException;
-import javax.jms.JMSProducer;
-import javax.jms.Message;
-import javax.jms.Session;
+import jakarta.inject.Inject;
+import jakarta.jms.ConnectionFactory;
+import jakarta.jms.Destination;
+import jakarta.jms.JMSConsumer;
+import jakarta.jms.JMSContext;
+import jakarta.jms.JMSException;
+import jakarta.jms.JMSProducer;
+import jakarta.jms.Message;
+import jakarta.jms.Session;
import org.acme.common.domain.Lesson;
import org.acme.common.domain.Room;