Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jakarta migration: Agroal, Hibernate ORM, Hibernate Search... #24879

Merged
merged 8 commits into from
Apr 12, 2022
3 changes: 1 addition & 2 deletions bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@
<hibernate-validator.version>6.2.3.Final</hibernate-validator.version>
<hibernate-search.version>6.1.3.Final</hibernate-search.version>
<narayana.version>5.12.6.Final</narayana.version>
<narayana-jts.version>5.12.6.Final</narayana-jts.version>
<jboss-transaction-api_1.2_spec.version>1.1.1.Final</jboss-transaction-api_1.2_spec.version>
<agroal.version>1.16</agroal.version>
<jboss-transaction-spi.version>7.6.0.Final</jboss-transaction-spi.version>
Expand Down Expand Up @@ -4038,7 +4037,7 @@
<dependency>
<groupId>org.jboss.narayana.jts</groupId>
<artifactId>narayana-jts-integration</artifactId>
<version>${narayana-jts.version}</version>
<version>${narayana.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.narayana.stm</groupId>
Expand Down
45 changes: 30 additions & 15 deletions extensions/agroal/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,28 +42,19 @@
<optional>true</optional>
</dependency>

<dependency>
<groupId>org.jboss.narayana.jta</groupId>
<artifactId>narayana-jta</artifactId>
</dependency>

<dependency>
<groupId>org.jboss.narayana.jts</groupId>
<artifactId>narayana-jts-integration</artifactId>
</dependency>

<dependency>
<groupId>jakarta.transaction</groupId>
<artifactId>jakarta.transaction-api</artifactId>
</dependency>

<dependency>
<groupId>io.agroal</groupId>
<artifactId>agroal-api</artifactId>
</dependency>
<dependency>
<groupId>io.agroal</groupId>
<artifactId>agroal-narayana</artifactId>
<exclusions>
<exclusion>
<groupId>org.jboss.spec.javax.transaction</groupId>
<artifactId>jboss-transaction-api_1.2_spec</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.agroal</groupId>
Expand Down Expand Up @@ -107,4 +98,28 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>jakarta-rewrite</id>
<activation>
<property>
<name>jakarta-rewrite</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.openrewrite.maven</groupId>
<artifactId>rewrite-maven-plugin</artifactId>
<configuration>
<activeRecipes>
<recipe>io.quarkus.hibernate-orm-narayana-switch</recipe>
</activeRecipes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
29 changes: 29 additions & 0 deletions extensions/hibernate-orm/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@
</exclusion>

<!-- Following dependencies are only necessary during metadata initialization -->
<exclusion>
<groupId>jakarta.activation</groupId>
<artifactId>jakarta.activation-api</artifactId>
</exclusion>
<exclusion>
<groupId>javax.activation</groupId>
<artifactId>javax.activation-api</artifactId>
Expand Down Expand Up @@ -184,4 +188,29 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>jakarta-rewrite</id>
<activation>
<property>
<name>jakarta-rewrite</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.openrewrite.maven</groupId>
<artifactId>rewrite-maven-plugin</artifactId>
<configuration>
<activeRecipes>
<recipe>io.quarkus.hibernate-orm-narayana-switch</recipe>
<recipe>io.quarkus.jakarta-jaxb-switch</recipe>
</activeRecipes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,28 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>jakarta-rewrite</id>
<activation>
<property>
<name>jakarta-rewrite</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.openrewrite.maven</groupId>
<artifactId>rewrite-maven-plugin</artifactId>
<configuration>
<activeRecipes>
<recipe>io.quarkus.hibernate-search-switch</recipe>
</activeRecipes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
24 changes: 24 additions & 0 deletions extensions/hibernate-search-orm-elasticsearch/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,28 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>jakarta-rewrite</id>
<activation>
<property>
<name>jakarta-rewrite</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.openrewrite.maven</groupId>
<artifactId>rewrite-maven-plugin</artifactId>
<configuration>
<activeRecipes>
<recipe>io.quarkus.hibernate-search-switch</recipe>
</activeRecipes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
24 changes: 24 additions & 0 deletions extensions/narayana-jta/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,28 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>jakarta-rewrite</id>
<activation>
<property>
<name>jakarta-rewrite</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.openrewrite.maven</groupId>
<artifactId>rewrite-maven-plugin</artifactId>
<configuration>
<activeRecipes>
<recipe>io.quarkus.hibernate-orm-narayana-switch</recipe>
</activeRecipes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-panache-hibernate-common</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-hibernate-orm</artifactId>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions extensions/panache/panache-hibernate-common/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
<artifactId>quarkus-panache-common</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-hibernate-orm</artifactId>
<groupId>jakarta.persistence</groupId>
<artifactId>jakarta.persistence-api</artifactId>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
Expand All @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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')
}
Expand Down
Loading