From b72bc15c7426c33095cf2da14e7178d7b042557c Mon Sep 17 00:00:00 2001 From: khalilou88 <32600911+khalilou88@users.noreply.github.com> Date: Thu, 18 May 2023 14:06:10 +0200 Subject: [PATCH] feat(nx-quarkus-maven): migrate to quarkus 3 (#209) --- packages/common/src/lib/versions/index.ts | 4 ++-- .../main/java/__packageDirectory__/GreetingResource.java | 8 ++++---- .../generators/application/files/kotlin/build.gradle.kts | 4 ++-- .../main/kotlin/__packageDirectory__/GreetingResource.kt | 8 ++++---- .../main/java/__packageDirectory__/GreetingService.java | 2 +- .../java/__packageDirectory__/GreetingServiceTest.java | 2 +- .../src/generators/library/files/kotlin/build.gradle.kts | 2 +- .../main/kotlin/__packageDirectory__/GreetingService.kt | 2 +- .../kotlin/__packageDirectory__/GreetingServiceTest.kt | 2 +- .../main/java/__packageDirectory__/GreetingResource.java | 8 ++++---- .../main/kotlin/__packageDirectory__/GreetingResource.kt | 8 ++++---- .../init/files/maven/config/pom.xml__template__ | 4 ++-- .../main/java/__packageDirectory__/GreetingService.java | 2 +- .../java/__packageDirectory__/GreetingServiceTest.java | 2 +- .../main/kotlin/__packageDirectory__/GreetingService.kt | 2 +- .../kotlin/__packageDirectory__/GreetingServiceTest.kt | 2 +- .../nx-quarkus-gradle-e2e/tests/nx-quarkus-gradle.spec.ts | 2 +- .../tests/nx-quarkus-gradle-kt.spec.ts | 2 +- .../nx-quarkus-maven-e2e/tests/nx-quarkus-maven.spec.ts | 2 +- 19 files changed, 34 insertions(+), 34 deletions(-) diff --git a/packages/common/src/lib/versions/index.ts b/packages/common/src/lib/versions/index.ts index fa5e3d96d..55e2de1e8 100644 --- a/packages/common/src/lib/versions/index.ts +++ b/packages/common/src/lib/versions/index.ts @@ -4,8 +4,8 @@ export const dependencyManagementVersion = '1.1.0'; export const springKotlinVersion = '1.7.22'; //Quarkus -export const quarkusPlatformVersion = '2.16.6.Final'; -export const quarkusKotlinVersion = '1.7.22'; +export const quarkusPlatformVersion = '3.0.3.Final'; +export const quarkusKotlinVersion = '1.8.10'; //Linters export const checkstyleVersion = '10.11.0'; diff --git a/packages/nx-quarkus-gradle/src/generators/application/files/java/src/main/java/__packageDirectory__/GreetingResource.java b/packages/nx-quarkus-gradle/src/generators/application/files/java/src/main/java/__packageDirectory__/GreetingResource.java index c13aa76ed..ebbabb114 100644 --- a/packages/nx-quarkus-gradle/src/generators/application/files/java/src/main/java/__packageDirectory__/GreetingResource.java +++ b/packages/nx-quarkus-gradle/src/generators/application/files/java/src/main/java/__packageDirectory__/GreetingResource.java @@ -1,9 +1,9 @@ package <%= packageName %>; -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("/hello") public class GreetingResource { diff --git a/packages/nx-quarkus-gradle/src/generators/application/files/kotlin/build.gradle.kts b/packages/nx-quarkus-gradle/src/generators/application/files/kotlin/build.gradle.kts index e447e4e66..858bb1bf6 100644 --- a/packages/nx-quarkus-gradle/src/generators/application/files/kotlin/build.gradle.kts +++ b/packages/nx-quarkus-gradle/src/generators/application/files/kotlin/build.gradle.kts @@ -39,8 +39,8 @@ tasks.withType { } allOpen { - annotation("javax.ws.rs.Path") - annotation("javax.enterprise.context.ApplicationScoped") + annotation("jakarta.ws.rs.Path") + annotation("jakarta.enterprise.context.ApplicationScoped") annotation("io.quarkus.test.junit.QuarkusTest") } diff --git a/packages/nx-quarkus-gradle/src/generators/application/files/kotlin/src/main/kotlin/__packageDirectory__/GreetingResource.kt b/packages/nx-quarkus-gradle/src/generators/application/files/kotlin/src/main/kotlin/__packageDirectory__/GreetingResource.kt index 652bf784d..d7d94d29d 100644 --- a/packages/nx-quarkus-gradle/src/generators/application/files/kotlin/src/main/kotlin/__packageDirectory__/GreetingResource.kt +++ b/packages/nx-quarkus-gradle/src/generators/application/files/kotlin/src/main/kotlin/__packageDirectory__/GreetingResource.kt @@ -1,9 +1,9 @@ package <%= packageName %> -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("/hello") class GreetingResource { diff --git a/packages/nx-quarkus-gradle/src/generators/library/files/java/src/main/java/__packageDirectory__/GreetingService.java b/packages/nx-quarkus-gradle/src/generators/library/files/java/src/main/java/__packageDirectory__/GreetingService.java index 44e9cfc55..610818641 100644 --- a/packages/nx-quarkus-gradle/src/generators/library/files/java/src/main/java/__packageDirectory__/GreetingService.java +++ b/packages/nx-quarkus-gradle/src/generators/library/files/java/src/main/java/__packageDirectory__/GreetingService.java @@ -1,6 +1,6 @@ package <%= packageName %>; -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; @ApplicationScoped public class GreetingService { diff --git a/packages/nx-quarkus-gradle/src/generators/library/files/java/src/test/java/__packageDirectory__/GreetingServiceTest.java b/packages/nx-quarkus-gradle/src/generators/library/files/java/src/test/java/__packageDirectory__/GreetingServiceTest.java index f6be0d77d..a8f10b5d1 100644 --- a/packages/nx-quarkus-gradle/src/generators/library/files/java/src/test/java/__packageDirectory__/GreetingServiceTest.java +++ b/packages/nx-quarkus-gradle/src/generators/library/files/java/src/test/java/__packageDirectory__/GreetingServiceTest.java @@ -1,6 +1,6 @@ package <%= packageName %>; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/packages/nx-quarkus-gradle/src/generators/library/files/kotlin/build.gradle.kts b/packages/nx-quarkus-gradle/src/generators/library/files/kotlin/build.gradle.kts index 466b91486..a50529217 100644 --- a/packages/nx-quarkus-gradle/src/generators/library/files/kotlin/build.gradle.kts +++ b/packages/nx-quarkus-gradle/src/generators/library/files/kotlin/build.gradle.kts @@ -35,7 +35,7 @@ tasks.withType { } allOpen { - annotation("javax.enterprise.context.ApplicationScoped") + annotation("jakarta.enterprise.context.ApplicationScoped") annotation("io.quarkus.test.junit.QuarkusTest") } diff --git a/packages/nx-quarkus-gradle/src/generators/library/files/kotlin/src/main/kotlin/__packageDirectory__/GreetingService.kt b/packages/nx-quarkus-gradle/src/generators/library/files/kotlin/src/main/kotlin/__packageDirectory__/GreetingService.kt index eddbeb1e9..8b9bf39aa 100644 --- a/packages/nx-quarkus-gradle/src/generators/library/files/kotlin/src/main/kotlin/__packageDirectory__/GreetingService.kt +++ b/packages/nx-quarkus-gradle/src/generators/library/files/kotlin/src/main/kotlin/__packageDirectory__/GreetingService.kt @@ -1,6 +1,6 @@ package <%= packageName %> -import javax.enterprise.context.ApplicationScoped +import jakarta.enterprise.context.ApplicationScoped @ApplicationScoped class GreetingService { diff --git a/packages/nx-quarkus-gradle/src/generators/library/files/kotlin/src/test/kotlin/__packageDirectory__/GreetingServiceTest.kt b/packages/nx-quarkus-gradle/src/generators/library/files/kotlin/src/test/kotlin/__packageDirectory__/GreetingServiceTest.kt index 91aaa47ff..e08e78b6d 100644 --- a/packages/nx-quarkus-gradle/src/generators/library/files/kotlin/src/test/kotlin/__packageDirectory__/GreetingServiceTest.kt +++ b/packages/nx-quarkus-gradle/src/generators/library/files/kotlin/src/test/kotlin/__packageDirectory__/GreetingServiceTest.kt @@ -3,7 +3,7 @@ package <%= packageName %> import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test import io.quarkus.test.junit.QuarkusTest -import javax.inject.Inject +import jakarta.inject.Inject @QuarkusTest diff --git a/packages/nx-quarkus-maven/src/generators/application/files/java/src/main/java/__packageDirectory__/GreetingResource.java b/packages/nx-quarkus-maven/src/generators/application/files/java/src/main/java/__packageDirectory__/GreetingResource.java index c13aa76ed..ebbabb114 100644 --- a/packages/nx-quarkus-maven/src/generators/application/files/java/src/main/java/__packageDirectory__/GreetingResource.java +++ b/packages/nx-quarkus-maven/src/generators/application/files/java/src/main/java/__packageDirectory__/GreetingResource.java @@ -1,9 +1,9 @@ package <%= packageName %>; -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("/hello") public class GreetingResource { diff --git a/packages/nx-quarkus-maven/src/generators/application/files/kotlin/src/main/kotlin/__packageDirectory__/GreetingResource.kt b/packages/nx-quarkus-maven/src/generators/application/files/kotlin/src/main/kotlin/__packageDirectory__/GreetingResource.kt index 652bf784d..d7d94d29d 100644 --- a/packages/nx-quarkus-maven/src/generators/application/files/kotlin/src/main/kotlin/__packageDirectory__/GreetingResource.kt +++ b/packages/nx-quarkus-maven/src/generators/application/files/kotlin/src/main/kotlin/__packageDirectory__/GreetingResource.kt @@ -1,9 +1,9 @@ package <%= packageName %> -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("/hello") class GreetingResource { diff --git a/packages/nx-quarkus-maven/src/generators/init/files/maven/config/pom.xml__template__ b/packages/nx-quarkus-maven/src/generators/init/files/maven/config/pom.xml__template__ index 7e5edf1b2..c47b3f4bc 100644 --- a/packages/nx-quarkus-maven/src/generators/init/files/maven/config/pom.xml__template__ +++ b/packages/nx-quarkus-maven/src/generators/init/files/maven/config/pom.xml__template__ @@ -107,8 +107,8 @@ all-open - - + + diff --git a/packages/nx-quarkus-maven/src/generators/library/files/java/src/main/java/__packageDirectory__/GreetingService.java b/packages/nx-quarkus-maven/src/generators/library/files/java/src/main/java/__packageDirectory__/GreetingService.java index 44e9cfc55..610818641 100644 --- a/packages/nx-quarkus-maven/src/generators/library/files/java/src/main/java/__packageDirectory__/GreetingService.java +++ b/packages/nx-quarkus-maven/src/generators/library/files/java/src/main/java/__packageDirectory__/GreetingService.java @@ -1,6 +1,6 @@ package <%= packageName %>; -import javax.enterprise.context.ApplicationScoped; +import jakarta.enterprise.context.ApplicationScoped; @ApplicationScoped public class GreetingService { diff --git a/packages/nx-quarkus-maven/src/generators/library/files/java/src/test/java/__packageDirectory__/GreetingServiceTest.java b/packages/nx-quarkus-maven/src/generators/library/files/java/src/test/java/__packageDirectory__/GreetingServiceTest.java index f6be0d77d..a8f10b5d1 100644 --- a/packages/nx-quarkus-maven/src/generators/library/files/java/src/test/java/__packageDirectory__/GreetingServiceTest.java +++ b/packages/nx-quarkus-maven/src/generators/library/files/java/src/test/java/__packageDirectory__/GreetingServiceTest.java @@ -1,6 +1,6 @@ package <%= packageName %>; -import javax.inject.Inject; +import jakarta.inject.Inject; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/packages/nx-quarkus-maven/src/generators/library/files/kotlin/src/main/kotlin/__packageDirectory__/GreetingService.kt b/packages/nx-quarkus-maven/src/generators/library/files/kotlin/src/main/kotlin/__packageDirectory__/GreetingService.kt index eddbeb1e9..8b9bf39aa 100644 --- a/packages/nx-quarkus-maven/src/generators/library/files/kotlin/src/main/kotlin/__packageDirectory__/GreetingService.kt +++ b/packages/nx-quarkus-maven/src/generators/library/files/kotlin/src/main/kotlin/__packageDirectory__/GreetingService.kt @@ -1,6 +1,6 @@ package <%= packageName %> -import javax.enterprise.context.ApplicationScoped +import jakarta.enterprise.context.ApplicationScoped @ApplicationScoped class GreetingService { diff --git a/packages/nx-quarkus-maven/src/generators/library/files/kotlin/src/test/kotlin/__packageDirectory__/GreetingServiceTest.kt b/packages/nx-quarkus-maven/src/generators/library/files/kotlin/src/test/kotlin/__packageDirectory__/GreetingServiceTest.kt index 91aaa47ff..e08e78b6d 100644 --- a/packages/nx-quarkus-maven/src/generators/library/files/kotlin/src/test/kotlin/__packageDirectory__/GreetingServiceTest.kt +++ b/packages/nx-quarkus-maven/src/generators/library/files/kotlin/src/test/kotlin/__packageDirectory__/GreetingServiceTest.kt @@ -3,7 +3,7 @@ package <%= packageName %> import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test import io.quarkus.test.junit.QuarkusTest -import javax.inject.Inject +import jakarta.inject.Inject @QuarkusTest diff --git a/testing-projects/e2e/nx-quarkus-gradle-e2e/tests/nx-quarkus-gradle.spec.ts b/testing-projects/e2e/nx-quarkus-gradle-e2e/tests/nx-quarkus-gradle.spec.ts index c7afc3e1c..161ed2382 100644 --- a/testing-projects/e2e/nx-quarkus-gradle-e2e/tests/nx-quarkus-gradle.spec.ts +++ b/testing-projects/e2e/nx-quarkus-gradle-e2e/tests/nx-quarkus-gradle.spec.ts @@ -976,7 +976,7 @@ describe('nx-quarkus-gradle e2e', () => { const newGreetingResourceContent = greetingResourceContent .replace( regex1, - `$&\nimport javax.inject.Inject;\nimport org.acme.${names( + `$&\nimport jakarta.inject.Inject;\nimport org.acme.${names( libName ).className.toLocaleLowerCase()}.GreetingService;` ) diff --git a/testing-projects/e2e/nx-quarkus-gradle-kt-e2e/tests/nx-quarkus-gradle-kt.spec.ts b/testing-projects/e2e/nx-quarkus-gradle-kt-e2e/tests/nx-quarkus-gradle-kt.spec.ts index b05e1d7e6..48e329c32 100644 --- a/testing-projects/e2e/nx-quarkus-gradle-kt-e2e/tests/nx-quarkus-gradle-kt.spec.ts +++ b/testing-projects/e2e/nx-quarkus-gradle-kt-e2e/tests/nx-quarkus-gradle-kt.spec.ts @@ -977,7 +977,7 @@ describe('nx-quarkus-gradle kt e2e', () => { const newGreetingResourceContent = greetingResourceContent .replace( regex1, - `$&\nimport javax.inject.Inject;\nimport org.acme.${names( + `$&\nimport jakarta.inject.Inject;\nimport org.acme.${names( libName ).className.toLocaleLowerCase()}.GreetingService;` ) diff --git a/testing-projects/e2e/nx-quarkus-maven-e2e/tests/nx-quarkus-maven.spec.ts b/testing-projects/e2e/nx-quarkus-maven-e2e/tests/nx-quarkus-maven.spec.ts index 6e92543d9..e3da5ba90 100644 --- a/testing-projects/e2e/nx-quarkus-maven-e2e/tests/nx-quarkus-maven.spec.ts +++ b/testing-projects/e2e/nx-quarkus-maven-e2e/tests/nx-quarkus-maven.spec.ts @@ -944,7 +944,7 @@ describe('nx-quarkus-maven e2e', () => { const newGreetingResourceContent = greetingResourceContent .replace( regex1, - `$&\nimport javax.inject.Inject;\nimport org.acme.${names( + `$&\nimport jakarta.inject.Inject;\nimport org.acme.${names( libName ).className.toLocaleLowerCase()}.GreetingService;` )