diff --git a/bom/application/pom.xml b/bom/application/pom.xml index f0b7e39698ee0..83a82955d3ad6 100644 --- a/bom/application/pom.xml +++ b/bom/application/pom.xml @@ -92,7 +92,6 @@ 6.2.3.Final 6.1.3.Final 5.12.6.Final - 5.12.6.Final 1.1.1.Final 1.16 7.6.0.Final @@ -4038,7 +4037,7 @@ org.jboss.narayana.jts narayana-jts-integration - ${narayana-jts.version} + ${narayana.version} org.jboss.narayana.stm diff --git a/extensions/agroal/runtime/pom.xml b/extensions/agroal/runtime/pom.xml index 95e4e00e536a2..e086b7643e6a4 100644 --- a/extensions/agroal/runtime/pom.xml +++ b/extensions/agroal/runtime/pom.xml @@ -42,21 +42,6 @@ true - - org.jboss.narayana.jta - narayana-jta - - - - org.jboss.narayana.jts - narayana-jts-integration - - - - jakarta.transaction - jakarta.transaction-api - - io.agroal agroal-api @@ -64,6 +49,12 @@ io.agroal agroal-narayana + + + org.jboss.spec.javax.transaction + jboss-transaction-api_1.2_spec + + io.agroal @@ -107,4 +98,28 @@ + + + + jakarta-rewrite + + + jakarta-rewrite + + + + + + org.openrewrite.maven + rewrite-maven-plugin + + + io.quarkus.hibernate-orm-narayana-switch + + + + + + + diff --git a/extensions/hibernate-orm/runtime/pom.xml b/extensions/hibernate-orm/runtime/pom.xml index efaaed003a84f..dc656513b0fee 100644 --- a/extensions/hibernate-orm/runtime/pom.xml +++ b/extensions/hibernate-orm/runtime/pom.xml @@ -80,6 +80,10 @@ + + jakarta.activation + jakarta.activation-api + javax.activation javax.activation-api @@ -184,4 +188,29 @@ + + + + jakarta-rewrite + + + jakarta-rewrite + + + + + + org.openrewrite.maven + rewrite-maven-plugin + + + io.quarkus.hibernate-orm-narayana-switch + io.quarkus.jakarta-jaxb-switch + + + + + + + diff --git a/extensions/hibernate-search-orm-coordination-outbox-polling/runtime/pom.xml b/extensions/hibernate-search-orm-coordination-outbox-polling/runtime/pom.xml index e5d88d739b8a0..824ff7007bbfc 100644 --- a/extensions/hibernate-search-orm-coordination-outbox-polling/runtime/pom.xml +++ b/extensions/hibernate-search-orm-coordination-outbox-polling/runtime/pom.xml @@ -63,4 +63,28 @@ + + + + jakarta-rewrite + + + jakarta-rewrite + + + + + + org.openrewrite.maven + rewrite-maven-plugin + + + io.quarkus.hibernate-search-switch + + + + + + + diff --git a/extensions/hibernate-search-orm-elasticsearch/runtime/pom.xml b/extensions/hibernate-search-orm-elasticsearch/runtime/pom.xml index b28f3c9728726..1f48eef3c9b0b 100644 --- a/extensions/hibernate-search-orm-elasticsearch/runtime/pom.xml +++ b/extensions/hibernate-search-orm-elasticsearch/runtime/pom.xml @@ -80,4 +80,28 @@ + + + + jakarta-rewrite + + + jakarta-rewrite + + + + + + org.openrewrite.maven + rewrite-maven-plugin + + + io.quarkus.hibernate-search-switch + + + + + + + diff --git a/extensions/narayana-jta/runtime/pom.xml b/extensions/narayana-jta/runtime/pom.xml index f6a1a6fd3a599..24061a3a9a95f 100644 --- a/extensions/narayana-jta/runtime/pom.xml +++ b/extensions/narayana-jta/runtime/pom.xml @@ -102,4 +102,28 @@ + + + + jakarta-rewrite + + + jakarta-rewrite + + + + + + org.openrewrite.maven + rewrite-maven-plugin + + + io.quarkus.hibernate-orm-narayana-switch + + + + + + + diff --git a/extensions/panache/hibernate-orm-panache-common/runtime/pom.xml b/extensions/panache/hibernate-orm-panache-common/runtime/pom.xml index 9625375d53dcf..ed94a94ec800d 100644 --- a/extensions/panache/hibernate-orm-panache-common/runtime/pom.xml +++ b/extensions/panache/hibernate-orm-panache-common/runtime/pom.xml @@ -16,6 +16,10 @@ io.quarkus quarkus-panache-hibernate-common + + io.quarkus + quarkus-hibernate-orm + org.junit.jupiter junit-jupiter diff --git a/extensions/panache/panache-hibernate-common/runtime/pom.xml b/extensions/panache/panache-hibernate-common/runtime/pom.xml index e973ccced23a5..dd0b52b346c16 100644 --- a/extensions/panache/panache-hibernate-common/runtime/pom.xml +++ b/extensions/panache/panache-hibernate-common/runtime/pom.xml @@ -25,8 +25,8 @@ quarkus-panache-common - io.quarkus - quarkus-hibernate-orm + jakarta.persistence + jakarta.persistence-api org.junit.jupiter diff --git a/extensions/smallrye-metrics/deployment/src/test/java/io/quarkus/smallrye/metrics/jaxrs/JaxRsMetricsTestCase.java b/extensions/smallrye-metrics/deployment/src/test/java/io/quarkus/smallrye/metrics/jaxrs/JaxRsMetricsTestCase.java index fc1d7851f55b8..956d81794d7a1 100644 --- a/extensions/smallrye-metrics/deployment/src/test/java/io/quarkus/smallrye/metrics/jaxrs/JaxRsMetricsTestCase.java +++ b/extensions/smallrye-metrics/deployment/src/test/java/io/quarkus/smallrye/metrics/jaxrs/JaxRsMetricsTestCase.java @@ -5,6 +5,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import javax.inject.Inject; +import javax.ws.rs.core.PathSegment; import org.eclipse.microprofile.metrics.Counter; import org.eclipse.microprofile.metrics.MetricRegistry; @@ -98,7 +99,7 @@ public void testMethodTakingArray() { .statusCode(200); SimpleTimer metric = metricRegistry.simpleTimer("REST.request", new Tag("class", METRIC_RESOURCE_CLASS_NAME), - new Tag("method", "array_javax.ws.rs.core.PathSegment[]")); + new Tag("method", "array_" + PathSegment.class.getName() + "[]")); assertEquals(1, metric.getCount()); assertTrue(metric.getElapsedTime().toNanos() > 0); } @@ -111,7 +112,7 @@ public void testMethodTakingVarargs() { .statusCode(200); SimpleTimer metric = metricRegistry.simpleTimer("REST.request", new Tag("class", METRIC_RESOURCE_CLASS_NAME), - new Tag("method", "varargs_javax.ws.rs.core.PathSegment[]")); + new Tag("method", "varargs_" + PathSegment.class.getName() + "[]")); assertEquals(1, metric.getCount()); assertTrue(metric.getElapsedTime().toNanos() > 0); } diff --git a/integration-tests/gradle/src/main/resources/conditional-dependencies/ext-a/deployment/build.gradle b/integration-tests/gradle/src/main/resources/conditional-dependencies/ext-a/deployment/build.gradle index bad52ad640978..4baa5827a95eb 100644 --- a/integration-tests/gradle/src/main/resources/conditional-dependencies/ext-a/deployment/build.gradle +++ b/integration-tests/gradle/src/main/resources/conditional-dependencies/ext-a/deployment/build.gradle @@ -9,8 +9,6 @@ dependencies { implementation("org.acme:simple-dependency:1.0-SNAPSHOT") implementation("io.quarkus:quarkus-hibernate-reactive-panache-deployment") - implementation("io.quarkus:quarkus-agroal-deployment") - implementation("io.quarkus:quarkus-narayana-jta-deployment") implementation project(':ext-a:runtime') } diff --git a/jakarta/rewrite.yml b/jakarta/rewrite.yml index c4b3f31a58a2d..e178f1e4b5815 100644 --- a/jakarta/rewrite.yml +++ b/jakarta/rewrite.yml @@ -64,6 +64,30 @@ recipeList: - org.openrewrite.maven.ChangePropertyValue: key: jakarta.persistence-api.version newValue: 3.0.0 + - org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: + oldGroupId: org.hibernate + oldArtifactId: hibernate-core + newGroupId: org.hibernate + newArtifactId: hibernate-core-jakarta + - org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: + oldGroupId: org.hibernate + oldArtifactId: hibernate-envers + newGroupId: org.hibernate + - org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: + oldGroupId: org.hibernate + oldArtifactId: hibernate-jpamodelgen + newGroupId: org.hibernate + newArtifactId: hibernate-jpamodelgen-jakarta + - org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: + oldGroupId: org.hibernate.search + oldArtifactId: hibernate-search-mapper-orm-coordination-outbox-polling + newGroupId: org.hibernate.search + newArtifactId: hibernate-search-mapper-orm-coordination-outbox-polling-jakarta + - org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: + oldGroupId: org.hibernate.search + oldArtifactId: hibernate-search-mapper-orm + newGroupId: org.hibernate.search + newArtifactId: hibernate-search-mapper-orm-jakarta # Security - See below # Servlet - org.openrewrite.maven.ChangePropertyValue: @@ -79,6 +103,24 @@ recipeList: - org.openrewrite.maven.ChangePropertyValue: key: jakarta.transaction-api.version newValue: 2.0.0 + - org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: + oldGroupId: org.jboss.narayana.jta + oldArtifactId: narayana-jta + newGroupId: org.jboss.narayana.jta + newArtifactId: narayana-jta-jakarta + - org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: + oldGroupId: org.jboss.narayana.jts + oldArtifactId: narayana-jts-integration + newGroupId: org.jboss.narayana.jts + newArtifactId: narayana-jts-integration-jakarta + - org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: + oldGroupId: io.agroal + oldArtifactId: agroal-narayana + newGroupId: io.agroal + newArtifactId: agroal-narayana-jakarta + - org.openrewrite.maven.ChangePropertyValue: + key: agroal.version + newValue: 1.17-SNAPSHOT # Validation - org.openrewrite.maven.ChangePropertyValue: key: jakarta.validation-api.version @@ -209,6 +251,86 @@ recipeList: newArtifactId: jakarta.authentication-api --- type: specs.openrewrite.org/v1beta/recipe +name: io.quarkus.hibernate-orm-narayana-switch +displayName: Switch Hibernate ORM/Narayana dependencies +recipeList: + - org.openrewrite.maven.RemoveExclusion: + groupId: org.hibernate + artifactId: hibernate-core + exclusionGroupId: javax.persistence + exclusionArtifactId: javax.persistence-api + - org.openrewrite.maven.RemoveExclusion: + groupId: org.hibernate + artifactId: hibernate-core + exclusionGroupId: org.jboss.spec.javax.transaction + exclusionArtifactId: jboss-transaction-api_1.2_spec + - org.openrewrite.maven.RemoveExclusion: + groupId: org.hibernate + artifactId: hibernate-core + exclusionGroupId: javax.xml.bind + exclusionArtifactId: jaxb-api + - org.openrewrite.maven.RemoveExclusion: + groupId: org.hibernate + artifactId: hibernate-core + exclusionGroupId: javax.activation + exclusionArtifactId: javax.activation-api + - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: + oldGroupId: org.jboss.narayana.jta + oldArtifactId: narayana-jta + newGroupId: org.jboss.narayana.jta + newArtifactId: narayana-jta-jakarta + - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: + oldGroupId: org.jboss.narayana.jts + oldArtifactId: narayana-jts-integration + newGroupId: org.jboss.narayana.jts + newArtifactId: narayana-jts-integration-jakarta + - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: + oldGroupId: org.hibernate + oldArtifactId: hibernate-core + newGroupId: org.hibernate + newArtifactId: hibernate-core-jakarta + - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: + oldGroupId: org.hibernate + oldArtifactId: hibernate-envers + newGroupId: org.hibernate + newArtifactId: hibernate-envers-jakarta + - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: + oldGroupId: org.hibernate + oldArtifactId: hibernate-jpamodelgen + newGroupId: org.hibernate + newArtifactId: hibernate-jpamodelgen-jakarta + - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: + oldGroupId: io.agroal + oldArtifactId: agroal-narayana + newGroupId: io.agroal + newArtifactId: agroal-narayana-jakarta +--- +type: specs.openrewrite.org/v1beta/recipe +name: io.quarkus.hibernate-search-switch +displayName: Switch Hibernate Search dependencies +recipeList: + - org.openrewrite.maven.RemoveExclusion: + groupId: org.hibernate.search + artifactId: hibernate-search-mapper-orm-coordination-outbox-polling + exclusionGroupId: javax.persistence + exclusionArtifactId: javax.persistence-api + - org.openrewrite.maven.RemoveExclusion: + groupId: org.hibernate.search + artifactId: hibernate-search-mapper-orm + exclusionGroupId: javax.persistence + exclusionArtifactId: javax.persistence-api + - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: + oldGroupId: org.hibernate.search + oldArtifactId: hibernate-search-mapper-orm-coordination-outbox-polling + newGroupId: org.hibernate.search + newArtifactId: hibernate-search-mapper-orm-coordination-outbox-polling-jakarta + - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: + oldGroupId: org.hibernate.search + oldArtifactId: hibernate-search-mapper-orm + newGroupId: org.hibernate.search + newArtifactId: hibernate-search-mapper-orm-jakarta +--- +type: specs.openrewrite.org/v1beta/recipe name: io.quarkus.smallrye displayName: Adjust SmallRye dependencies recipeList: diff --git a/jakarta/transform.sh b/jakarta/transform.sh index 4e71944891315..279cfe9342a16 100755 --- a/jakarta/transform.sh +++ b/jakarta/transform.sh @@ -40,6 +40,14 @@ if [ "${REWRITE_OFFLINE-false}" != "true" ]; then #mvn clean install -DskipTests -DskipITs #popd + # Build Agroal (temporary) + rm -rf target/agroal + git clone https://github.com/gsmet/agroal.git target/agroal + pushd target/agroal + git checkout jakarta + mvn clean install -DskipTests -DskipITs + popd + # Build Quarkus HTTP (temporary) rm -rf target/quarkus-http git clone https://github.com/quarkusio/quarkus-http.git target/quarkus-http @@ -354,6 +362,8 @@ build_module "extensions/smallrye-openapi-common" build_module "extensions/swagger-ui" build_module "extensions/smallrye-openapi" build_module "extensions/smallrye-health" +# TODO: tests are not passing for now, I pinged Jan +build_module "extensions/smallrye-metrics" # Persistence build_module "extensions/credentials" @@ -363,6 +373,27 @@ build_module_no_tests "extensions/datasource/common" build_module_no_tests "extensions/datasource/deployment-spi/" build_module "extensions/devservices" build_module "extensions/datasource" +build_module "extensions/transaction-annotations" +build_module "extensions/narayana-jta" +build_module "test-framework/h2" +# we only build H2 as the others need Agroal for testing +build_module_only_no_tests "extensions/agroal" +build_module_only_no_tests "extensions/agroal/spi" +# this one needs particular care but we will rebuild it properly after +./mvnw clean install -f "extensions/agroal/runtime" -DskipExtensionValidation +build_module_only_no_tests "extensions/jdbc" +build_module "extensions/jdbc/jdbc-h2" +build_module "extensions/agroal" +build_module "extensions/jdbc" +build_module "extensions/caffeine" +build_module "extensions/panache/panache-hibernate-common" +build_module "extensions/hibernate-orm" +build_module "extensions/elasticsearch-rest-client-common" +build_module "extensions/elasticsearch-rest-client" +build_module "extensions/elasticsearch-rest-high-level-client" +build_module "extensions/hibernate-search-orm-elasticsearch" +build_module "extensions/avro" +build_module "extensions/hibernate-search-orm-coordination-outbox-polling" exit 0