From 4b0395334777e36bc7761ca270e18914d10e6076 Mon Sep 17 00:00:00 2001 From: Daniel Kraus Date: Mon, 3 Jul 2023 16:40:04 +0200 Subject: [PATCH 01/10] Migrate to Quarkus 3 --- pom.xml | 2 +- .../samples/petclinic/JaxRsApplication.java | 2 +- .../samples/petclinic/model/Person.java | 8 +++---- .../petclinic/owner/LocalDateConverter.java | 2 +- .../LocalDateParamConverterProvider.java | 6 ++--- .../samples/petclinic/owner/Owner.java | 18 +++++++------- .../samples/petclinic/owner/OwnerForm.java | 2 +- .../petclinic/owner/OwnersResource.java | 24 +++++++++---------- .../quarkus/samples/petclinic/owner/Pet.java | 14 +++++------ .../samples/petclinic/owner/PetResource.java | 22 ++++++++--------- .../samples/petclinic/owner/PetType.java | 6 ++--- .../petclinic/owner/VisitResource.java | 22 ++++++++--------- .../petclinic/system/CrashResource.java | 8 +++---- .../system/ErrorExceptionMapper.java | 4 ++-- .../system/LocaleVariantCreator.java | 2 +- .../petclinic/system/TemplatesLocale.java | 2 +- .../petclinic/system/WelcomeResource.java | 10 ++++---- .../samples/petclinic/vet/Specialty.java | 6 ++--- .../quarkus/samples/petclinic/vet/Vet.java | 12 +++++----- .../samples/petclinic/vet/VetResource.java | 10 ++++---- .../quarkus/samples/petclinic/vet/Vets.java | 2 +- .../samples/petclinic/visit/Visit.java | 10 ++++---- src/main/resources/application.properties | 3 +++ 23 files changed, 100 insertions(+), 97 deletions(-) diff --git a/pom.xml b/pom.xml index fd9973a..552fb34 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ UTF-8 quarkus-bom io.quarkus - 2.16.0.Final + 3.1.3.Final 2.22.1 5.1.3 4.7.0 diff --git a/src/main/java/org/quarkus/samples/petclinic/JaxRsApplication.java b/src/main/java/org/quarkus/samples/petclinic/JaxRsApplication.java index df9d259..745fcf9 100644 --- a/src/main/java/org/quarkus/samples/petclinic/JaxRsApplication.java +++ b/src/main/java/org/quarkus/samples/petclinic/JaxRsApplication.java @@ -1,7 +1,7 @@ package org.quarkus.samples.petclinic; import io.smallrye.common.annotation.Blocking; -import javax.ws.rs.core.Application; +import jakarta.ws.rs.core.Application; /** * Used to ensure that all endpoints are blocking by default diff --git a/src/main/java/org/quarkus/samples/petclinic/model/Person.java b/src/main/java/org/quarkus/samples/petclinic/model/Person.java index 205fc07..53ee581 100644 --- a/src/main/java/org/quarkus/samples/petclinic/model/Person.java +++ b/src/main/java/org/quarkus/samples/petclinic/model/Person.java @@ -1,9 +1,9 @@ package org.quarkus.samples.petclinic.model; -import javax.persistence.Column; -import javax.persistence.MappedSuperclass; -import javax.validation.constraints.NotEmpty; -import javax.ws.rs.FormParam; +import jakarta.persistence.Column; +import jakarta.persistence.MappedSuperclass; +import jakarta.validation.constraints.NotEmpty; +import jakarta.ws.rs.FormParam; import io.quarkus.hibernate.orm.panache.PanacheEntity; diff --git a/src/main/java/org/quarkus/samples/petclinic/owner/LocalDateConverter.java b/src/main/java/org/quarkus/samples/petclinic/owner/LocalDateConverter.java index c7d144f..70807ce 100644 --- a/src/main/java/org/quarkus/samples/petclinic/owner/LocalDateConverter.java +++ b/src/main/java/org/quarkus/samples/petclinic/owner/LocalDateConverter.java @@ -2,7 +2,7 @@ import java.time.LocalDate; -import javax.ws.rs.ext.ParamConverter; +import jakarta.ws.rs.ext.ParamConverter; public class LocalDateConverter implements ParamConverter { diff --git a/src/main/java/org/quarkus/samples/petclinic/owner/LocalDateParamConverterProvider.java b/src/main/java/org/quarkus/samples/petclinic/owner/LocalDateParamConverterProvider.java index 76053b6..1bfcaba 100644 --- a/src/main/java/org/quarkus/samples/petclinic/owner/LocalDateParamConverterProvider.java +++ b/src/main/java/org/quarkus/samples/petclinic/owner/LocalDateParamConverterProvider.java @@ -1,8 +1,8 @@ package org.quarkus.samples.petclinic.owner; -import javax.ws.rs.ext.ParamConverter; -import javax.ws.rs.ext.ParamConverterProvider; -import javax.ws.rs.ext.Provider; +import jakarta.ws.rs.ext.ParamConverter; +import jakarta.ws.rs.ext.ParamConverterProvider; +import jakarta.ws.rs.ext.Provider; import java.lang.annotation.Annotation; import java.lang.reflect.Type; import java.time.LocalDate; diff --git a/src/main/java/org/quarkus/samples/petclinic/owner/Owner.java b/src/main/java/org/quarkus/samples/petclinic/owner/Owner.java index ca62603..3de2aff 100644 --- a/src/main/java/org/quarkus/samples/petclinic/owner/Owner.java +++ b/src/main/java/org/quarkus/samples/petclinic/owner/Owner.java @@ -4,15 +4,15 @@ import java.util.HashSet; import java.util.Set; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.OneToMany; -import javax.persistence.Table; -import javax.validation.constraints.Digits; -import javax.validation.constraints.NotEmpty; -import javax.ws.rs.FormParam; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; +import jakarta.validation.constraints.Digits; +import jakarta.validation.constraints.NotEmpty; +import jakarta.ws.rs.FormParam; import org.quarkus.samples.petclinic.model.Person; diff --git a/src/main/java/org/quarkus/samples/petclinic/owner/OwnerForm.java b/src/main/java/org/quarkus/samples/petclinic/owner/OwnerForm.java index 99f4b93..c0aaf55 100644 --- a/src/main/java/org/quarkus/samples/petclinic/owner/OwnerForm.java +++ b/src/main/java/org/quarkus/samples/petclinic/owner/OwnerForm.java @@ -1,6 +1,6 @@ package org.quarkus.samples.petclinic.owner; -import javax.ws.rs.FormParam; +import jakarta.ws.rs.FormParam; public class OwnerForm { diff --git a/src/main/java/org/quarkus/samples/petclinic/owner/OwnersResource.java b/src/main/java/org/quarkus/samples/petclinic/owner/OwnersResource.java index 8ae0745..a3b86d4 100644 --- a/src/main/java/org/quarkus/samples/petclinic/owner/OwnersResource.java +++ b/src/main/java/org/quarkus/samples/petclinic/owner/OwnersResource.java @@ -10,18 +10,18 @@ import java.util.Map; import java.util.Set; -import javax.inject.Inject; -import javax.transaction.Transactional; -import javax.validation.ConstraintViolation; -import javax.validation.Validator; -import javax.ws.rs.BeanParam; -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.QueryParam; -import javax.ws.rs.core.MediaType; +import jakarta.inject.Inject; +import jakarta.transaction.Transactional; +import jakarta.validation.ConstraintViolation; +import jakarta.validation.Validator; +import jakarta.ws.rs.BeanParam; +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.QueryParam; +import jakarta.ws.rs.core.MediaType; import io.quarkus.qute.TemplateInstance; diff --git a/src/main/java/org/quarkus/samples/petclinic/owner/Pet.java b/src/main/java/org/quarkus/samples/petclinic/owner/Pet.java index 37caa6d..e7e2c4b 100644 --- a/src/main/java/org/quarkus/samples/petclinic/owner/Pet.java +++ b/src/main/java/org/quarkus/samples/petclinic/owner/Pet.java @@ -9,13 +9,13 @@ import java.util.List; import java.util.Set; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; -import javax.persistence.Transient; -import javax.validation.constraints.NotEmpty; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import jakarta.persistence.Transient; +import jakarta.validation.constraints.NotEmpty; import org.quarkus.samples.petclinic.visit.Visit; diff --git a/src/main/java/org/quarkus/samples/petclinic/owner/PetResource.java b/src/main/java/org/quarkus/samples/petclinic/owner/PetResource.java index 8c6af38..c53eb00 100644 --- a/src/main/java/org/quarkus/samples/petclinic/owner/PetResource.java +++ b/src/main/java/org/quarkus/samples/petclinic/owner/PetResource.java @@ -9,17 +9,17 @@ import java.util.Map; import java.util.Set; -import javax.inject.Inject; -import javax.transaction.Transactional; -import javax.validation.ConstraintViolation; -import javax.validation.Validator; -import javax.ws.rs.FormParam; -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.transaction.Transactional; +import jakarta.validation.ConstraintViolation; +import jakarta.validation.Validator; +import jakarta.ws.rs.FormParam; +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 io.quarkus.qute.TemplateInstance; diff --git a/src/main/java/org/quarkus/samples/petclinic/owner/PetType.java b/src/main/java/org/quarkus/samples/petclinic/owner/PetType.java index 22df79a..31b315e 100644 --- a/src/main/java/org/quarkus/samples/petclinic/owner/PetType.java +++ b/src/main/java/org/quarkus/samples/petclinic/owner/PetType.java @@ -2,9 +2,9 @@ import java.util.Collection; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Table; import io.quarkus.hibernate.orm.panache.PanacheEntity; import io.quarkus.qute.TemplateExtension; diff --git a/src/main/java/org/quarkus/samples/petclinic/owner/VisitResource.java b/src/main/java/org/quarkus/samples/petclinic/owner/VisitResource.java index 6796cc7..d750d42 100644 --- a/src/main/java/org/quarkus/samples/petclinic/owner/VisitResource.java +++ b/src/main/java/org/quarkus/samples/petclinic/owner/VisitResource.java @@ -8,17 +8,17 @@ import java.util.Map; import java.util.Set; -import javax.inject.Inject; -import javax.transaction.Transactional; -import javax.validation.ConstraintViolation; -import javax.validation.Validator; -import javax.ws.rs.BeanParam; -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.transaction.Transactional; +import jakarta.validation.ConstraintViolation; +import jakarta.validation.Validator; +import jakarta.ws.rs.BeanParam; +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 io.quarkus.qute.TemplateInstance; diff --git a/src/main/java/org/quarkus/samples/petclinic/system/CrashResource.java b/src/main/java/org/quarkus/samples/petclinic/system/CrashResource.java index 97d30fb..2a2d0ee 100644 --- a/src/main/java/org/quarkus/samples/petclinic/system/CrashResource.java +++ b/src/main/java/org/quarkus/samples/petclinic/system/CrashResource.java @@ -1,9 +1,9 @@ package org.quarkus.samples.petclinic.system; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; @Path("/oups") public class CrashResource { diff --git a/src/main/java/org/quarkus/samples/petclinic/system/ErrorExceptionMapper.java b/src/main/java/org/quarkus/samples/petclinic/system/ErrorExceptionMapper.java index bcbf7e6..789695e 100644 --- a/src/main/java/org/quarkus/samples/petclinic/system/ErrorExceptionMapper.java +++ b/src/main/java/org/quarkus/samples/petclinic/system/ErrorExceptionMapper.java @@ -1,7 +1,7 @@ package org.quarkus.samples.petclinic.system; -import javax.inject.Inject; -import javax.ws.rs.core.Response; +import jakarta.inject.Inject; +import jakarta.ws.rs.core.Response; import org.jboss.logging.Logger; import org.jboss.resteasy.reactive.server.ServerExceptionMapper; diff --git a/src/main/java/org/quarkus/samples/petclinic/system/LocaleVariantCreator.java b/src/main/java/org/quarkus/samples/petclinic/system/LocaleVariantCreator.java index 51d48a7..3796230 100644 --- a/src/main/java/org/quarkus/samples/petclinic/system/LocaleVariantCreator.java +++ b/src/main/java/org/quarkus/samples/petclinic/system/LocaleVariantCreator.java @@ -3,7 +3,7 @@ import java.nio.charset.StandardCharsets; import java.util.Locale; -import javax.ws.rs.core.MediaType; +import jakarta.ws.rs.core.MediaType; import io.quarkus.qute.Variant; diff --git a/src/main/java/org/quarkus/samples/petclinic/system/TemplatesLocale.java b/src/main/java/org/quarkus/samples/petclinic/system/TemplatesLocale.java index 643fd20..3882ae6 100644 --- a/src/main/java/org/quarkus/samples/petclinic/system/TemplatesLocale.java +++ b/src/main/java/org/quarkus/samples/petclinic/system/TemplatesLocale.java @@ -1,6 +1,6 @@ package org.quarkus.samples.petclinic.system; -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; import java.util.Collection; import java.util.List; diff --git a/src/main/java/org/quarkus/samples/petclinic/system/WelcomeResource.java b/src/main/java/org/quarkus/samples/petclinic/system/WelcomeResource.java index 2cbe445..22cd42c 100644 --- a/src/main/java/org/quarkus/samples/petclinic/system/WelcomeResource.java +++ b/src/main/java/org/quarkus/samples/petclinic/system/WelcomeResource.java @@ -2,11 +2,11 @@ import java.util.Locale; -import javax.inject.Inject; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; +import jakarta.inject.Inject; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; import io.quarkus.qute.TemplateInstance; diff --git a/src/main/java/org/quarkus/samples/petclinic/vet/Specialty.java b/src/main/java/org/quarkus/samples/petclinic/vet/Specialty.java index df34f11..79c6a62 100644 --- a/src/main/java/org/quarkus/samples/petclinic/vet/Specialty.java +++ b/src/main/java/org/quarkus/samples/petclinic/vet/Specialty.java @@ -1,8 +1,8 @@ package org.quarkus.samples.petclinic.vet; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Table; import io.quarkus.hibernate.orm.panache.PanacheEntity; diff --git a/src/main/java/org/quarkus/samples/petclinic/vet/Vet.java b/src/main/java/org/quarkus/samples/petclinic/vet/Vet.java index 3d59d2f..1a5af8b 100644 --- a/src/main/java/org/quarkus/samples/petclinic/vet/Vet.java +++ b/src/main/java/org/quarkus/samples/petclinic/vet/Vet.java @@ -6,12 +6,12 @@ import java.util.List; import java.util.Set; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinTable; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToMany; -import javax.persistence.Table; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinTable; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToMany; +import jakarta.persistence.Table; import org.quarkus.samples.petclinic.model.Person; diff --git a/src/main/java/org/quarkus/samples/petclinic/vet/VetResource.java b/src/main/java/org/quarkus/samples/petclinic/vet/VetResource.java index 7c11ce3..baee222 100644 --- a/src/main/java/org/quarkus/samples/petclinic/vet/VetResource.java +++ b/src/main/java/org/quarkus/samples/petclinic/vet/VetResource.java @@ -7,11 +7,11 @@ import java.util.List; -import javax.inject.Inject; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; +import jakarta.inject.Inject; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; @Path("/") public class VetResource { diff --git a/src/main/java/org/quarkus/samples/petclinic/vet/Vets.java b/src/main/java/org/quarkus/samples/petclinic/vet/Vets.java index cb3ffbf..4482f1c 100644 --- a/src/main/java/org/quarkus/samples/petclinic/vet/Vets.java +++ b/src/main/java/org/quarkus/samples/petclinic/vet/Vets.java @@ -3,7 +3,7 @@ import java.util.ArrayList; import java.util.List; -import javax.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlElement; public class Vets { diff --git a/src/main/java/org/quarkus/samples/petclinic/visit/Visit.java b/src/main/java/org/quarkus/samples/petclinic/visit/Visit.java index e3e9da6..15eac36 100644 --- a/src/main/java/org/quarkus/samples/petclinic/visit/Visit.java +++ b/src/main/java/org/quarkus/samples/petclinic/visit/Visit.java @@ -3,11 +3,11 @@ import java.time.LocalDate; import java.util.Collection; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Table; -import javax.validation.constraints.NotEmpty; -import javax.ws.rs.FormParam; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Table; +import jakarta.validation.constraints.NotEmpty; +import jakarta.ws.rs.FormParam; import io.quarkus.hibernate.orm.panache.PanacheEntity; diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 4dafe3b..910f1ea 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -20,3 +20,6 @@ quarkus.kubernetes.service-type=load-balancer quarkus.http.enable-compression=true quarkus.http.enable-decompression=true quarkus.qute.strict-rendering=true + +quarkus.index-dependency.jakarta-ws-rs-api.group-id=jakarta.ws.rs +quarkus.index-dependency.jakarta-ws-rs-api.artifact-id=jakarta.ws.rs-api From 341ceb45b678814b582e9367501795a27514cf76 Mon Sep 17 00:00:00 2001 From: Daniel Kraus Date: Mon, 3 Jul 2023 16:49:28 +0200 Subject: [PATCH 02/10] Migrate to Java 17 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 552fb34..4187bc9 100644 --- a/pom.xml +++ b/pom.xml @@ -8,8 +8,8 @@ 3.8.1 true - 11 - 11 + 17 + 17 UTF-8 UTF-8 quarkus-bom From 1fba8bf8d7a4fd051990a4b7f49318a48da946f5 Mon Sep 17 00:00:00 2001 From: Daniel Kraus Date: Mon, 31 Jul 2023 09:45:13 +0200 Subject: [PATCH 03/10] Update Quarkus 3.1.3 to 3.2.2 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4187bc9..0672121 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ UTF-8 quarkus-bom io.quarkus - 3.1.3.Final + 3.2.2.Final 2.22.1 5.1.3 4.7.0 From cb574f329d7ad1871dadc8b0632c9baf239451e3 Mon Sep 17 00:00:00 2001 From: Daniel Kraus Date: Mon, 31 Jul 2023 09:52:30 +0200 Subject: [PATCH 04/10] Remove quarkus.index-dependency entry Fixed in Quarkus 3.2.1: https://github.com/quarkusio/quarkus/pull/34570 --- src/main/resources/application.properties | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 910f1ea..4dafe3b 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -20,6 +20,3 @@ quarkus.kubernetes.service-type=load-balancer quarkus.http.enable-compression=true quarkus.http.enable-decompression=true quarkus.qute.strict-rendering=true - -quarkus.index-dependency.jakarta-ws-rs-api.group-id=jakarta.ws.rs -quarkus.index-dependency.jakarta-ws-rs-api.artifact-id=jakarta.ws.rs-api From 53829826d3061dff7d0703819769a79175e22d4f Mon Sep 17 00:00:00 2001 From: Daniel Kraus Date: Mon, 31 Jul 2023 10:56:34 +0200 Subject: [PATCH 05/10] Use java-17-openjdk-headless for Dockerfiles --- src/main/docker/Dockerfile.fast-jar | 2 +- src/main/docker/Dockerfile.jvm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/docker/Dockerfile.fast-jar b/src/main/docker/Dockerfile.fast-jar index 92f9ca3..362a211 100644 --- a/src/main/docker/Dockerfile.fast-jar +++ b/src/main/docker/Dockerfile.fast-jar @@ -23,7 +23,7 @@ ### FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3 -ARG JAVA_PACKAGE=java-11-openjdk-headless +ARG JAVA_PACKAGE=java-17-openjdk-headless ARG RUN_JAVA_VERSION=1.3.8 ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' # Install java and the run-java script diff --git a/src/main/docker/Dockerfile.jvm b/src/main/docker/Dockerfile.jvm index b64e89e..9da7096 100644 --- a/src/main/docker/Dockerfile.jvm +++ b/src/main/docker/Dockerfile.jvm @@ -23,7 +23,7 @@ ### FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3 -ARG JAVA_PACKAGE=java-11-openjdk-headless +ARG JAVA_PACKAGE=java-17-openjdk-headless ARG RUN_JAVA_VERSION=1.3.8 ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' # Install java and the run-java script From 7d4a4be10f116a3138e1d04fcbd8354262231f91 Mon Sep 17 00:00:00 2001 From: Daniel Kraus Date: Mon, 31 Jul 2023 10:58:45 +0200 Subject: [PATCH 06/10] Use udi-rhel8 for devfile --- devfile.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devfile.yaml b/devfile.yaml index 6759a0e..3e565f3 100644 --- a/devfile.yaml +++ b/devfile.yaml @@ -14,7 +14,7 @@ components: id: redhat/vscode-openshift-connector/latest - type: dockerimage alias: maven - image: 'registry.redhat.io/codeready-workspaces/plugin-java11-rhel8@sha256:641e223f5efbc32bab3461aa000e3a50a5dcca063331322158d1c959129ffd99' + image: 'registry.redhat.io/devspaces/udi-rhel8@sha256:b1f112760b2640b5e8612869536a000612837e8e247c74d3d99e9fcfbc56d2f3' env: - name: JAVA_OPTS value: '-XX:MaxRAMPercentage=50.0 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xms20m -Djava.security.egd=file:/dev/./urandom -Duser.home=/home/jboss' From 9614344f3f78822c7aa4cd199b5117c8ff12dd42 Mon Sep 17 00:00:00 2001 From: Daniel Kraus Date: Thu, 22 Feb 2024 22:44:51 +0100 Subject: [PATCH 07/10] Update Quarkus 3.2.2 to 3.7.4 --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 0672121..a3baa0d 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ quarkus-petclinic 1.0.0-SNAPSHOT - 3.8.1 + 3.12.1 true 17 17 @@ -14,8 +14,8 @@ UTF-8 quarkus-bom io.quarkus - 3.2.2.Final - 2.22.1 + 3.7.4 + 3.2.3 5.1.3 4.7.0 From b42b2a8ed188353341769f70faca8465eafc7415 Mon Sep 17 00:00:00 2001 From: Daniel Kraus Date: Sat, 2 Mar 2024 20:15:09 +0100 Subject: [PATCH 08/10] Update Quarkus 3.7.4 to 3.8.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a3baa0d..12b9dea 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ UTF-8 quarkus-bom io.quarkus - 3.7.4 + 3.8.1 3.2.3 5.1.3 4.7.0 From e5495025c8ab9bb8972042863f1e381480bf672e Mon Sep 17 00:00:00 2001 From: Daniel Kraus Date: Fri, 8 Mar 2024 21:56:24 +0100 Subject: [PATCH 09/10] Fix vet_specialties The DDL of `vet_specialties` is: ```sql create table vet_specialties ( specialty_id bigint not null, vet_id bigint not null, primary key (specialty_id, vet_id) ) ``` The `import.sql` was creating tuples of `(vet_id, specialty_id)`, causing the following exception on startup: ```text org.postgresql.util.PSQLException: ERROR: insert or update on table "vet_specialties" violates foreign key constraint "fk35uiboyrpfn1bndrr5jorcj0m" Detail: Key (specialty_id)=(1004) is not present in table "specialties". ``` --- src/main/resources/import.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/resources/import.sql b/src/main/resources/import.sql index 78c608d..d1a6964 100644 --- a/src/main/resources/import.sql +++ b/src/main/resources/import.sql @@ -9,11 +9,11 @@ INSERT INTO specialties VALUES (1001, 'radiology'); INSERT INTO specialties VALUES (1002, 'surgery'); INSERT INTO specialties VALUES (1003, 'dentistry'); -INSERT INTO vet_specialties VALUES (1002, 1001); -INSERT INTO vet_specialties VALUES (1003, 1002); +INSERT INTO vet_specialties VALUES (1001, 1002); +INSERT INTO vet_specialties VALUES (1002, 1003); INSERT INTO vet_specialties VALUES (1003, 1003); -INSERT INTO vet_specialties VALUES (1004, 1002); -INSERT INTO vet_specialties VALUES (1005, 1001); +INSERT INTO vet_specialties VALUES (1002, 1004); +INSERT INTO vet_specialties VALUES (1001, 1005); INSERT INTO types VALUES (1001, 'cat'); INSERT INTO types VALUES (1002, 'dog'); From 84182ffcc70a1fb0c7607474a9a6e28dc14f3548 Mon Sep 17 00:00:00 2001 From: Daniel Kraus Date: Fri, 8 Mar 2024 23:21:49 +0100 Subject: [PATCH 10/10] Update Quarkus 3.8.1 to 3.8.2 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 12b9dea..36c5f85 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ UTF-8 quarkus-bom io.quarkus - 3.8.1 + 3.8.2 3.2.3 5.1.3 4.7.0