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

More Jakarta progress #27238

Merged
merged 16 commits into from
Aug 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ updates:
allow:
- dependency-name: org.jboss:jboss-parent
- dependency-name: org.jboss.resteasy:*
- dependency-name: org.jboss.resteasy.microprofile:*
- dependency-name: org.jboss.resteasy.spring:*
- dependency-name: org.apache.activemq:*
- dependency-name: org.flywaydb:*
- dependency-name: org.liquibase:*
Expand Down Expand Up @@ -85,9 +87,9 @@ updates:
- dependency-name: net.revelc.code.formatter:formatter-maven-plugin
- dependency-name: net.revelc.code:impsort-maven-plugin
# Narayana
- dependency-name: org.jboss.narayana.jta:narayana-jta
- dependency-name: org.jboss.narayana.jts:narayana-jts-integration
- dependency-name: org.jboss.narayana.stm:stm
- dependency-name: org.jboss.narayana.jta:*
- dependency-name: org.jboss.narayana.jts:*
- dependency-name: org.jboss.narayana.stm:*
# Agroal
- dependency-name: io.agroal:*
# Jandex
Expand Down Expand Up @@ -173,6 +175,13 @@ updates:
- dependency-name: org.jboss.jdeparser:jdeparser
- dependency-name: com.github.javaparser:javaparser-core
- dependency-name: com.h2database:h2
# Jakarta 9/10 preparation
- dependency-name: jakarta.activation:jakarta.activation-api
- dependency-name: org.eclipse.angus:angus-activation
- dependency-name: org.glassfish.expressly:expressly
- dependency-name: com.sun.xml.bind:jaxb-impl
- dependency-name: jakarta.xml.bind:jakarta.xml.bind-api
- dependency-name: org.eclipse.parsson:*
ignore:
# this one cannot be upgraded due to the usage of proxies in new versions
# the proxy implements interfaces in a random order which causes issues
Expand Down
22 changes: 1 addition & 21 deletions extensions/amazon-lambda-http/http-event-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,31 +25,11 @@
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-client</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.activation</groupId>
<artifactId>jakarta.activation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- quarkus-apache-httpclient is needed for resteasy-client -->
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-apache-httpclient</artifactId>
<artifactId>quarkus-rest-client</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
</plugins>
</build>
</project>
18 changes: 1 addition & 17 deletions extensions/amazon-lambda-rest/rest-event-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,9 @@
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-client</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.activation</groupId>
<artifactId>jakarta.activation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- quarkus-apache-httpclient is needed for resteasy-client -->
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-apache-httpclient</artifactId>
<artifactId>quarkus-rest-client</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
18 changes: 1 addition & 17 deletions extensions/amazon-lambda/event-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,9 @@
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-client</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<exclusion>
<groupId>jakarta.activation</groupId>
<artifactId>jakarta.activation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- quarkus-apache-httpclient is needed for resteasy-client -->
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-apache-httpclient</artifactId>
<artifactId>quarkus-rest-client</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@
import javax.json.bind.serializer.SerializationContext;
import javax.json.stream.JsonGenerator;

import org.eclipse.yasson.internal.Marshaller;
import org.eclipse.yasson.internal.ProcessingContext;
import org.eclipse.yasson.internal.model.ClassModel;
import org.eclipse.yasson.internal.model.PropertyModel;

public class HalEntityWrapperJsonbSerializer implements JsonbSerializer<HalEntityWrapper> {

@Override
public void serialize(HalEntityWrapper wrapper, JsonGenerator generator, SerializationContext context) {
Marshaller marshaller = (Marshaller) context;
ProcessingContext processingContext = (ProcessingContext) context;
Object entity = wrapper.getEntity();

if (!marshaller.addProcessedObject(entity)) {
if (!processingContext.addProcessedObject(entity)) {
throw new RuntimeException("Cyclic dependency when marshaling an object");
}

try {
generator.writeStartObject();
ClassModel classModel = marshaller.getMappingContext().getOrCreateClassModel(entity.getClass());
ClassModel classModel = processingContext.getMappingContext().getOrCreateClassModel(entity.getClass());

for (PropertyModel property : classModel.getSortedProperties()) {
if (property.isReadable()) {
Expand All @@ -34,7 +34,7 @@ public void serialize(HalEntityWrapper wrapper, JsonGenerator generator, Seriali
writeLinks(wrapper.getLinks(), generator, context);
generator.writeEnd();
} finally {
marshaller.removeProcessedObject(entity);
processingContext.removeProcessedObject(entity);
}
}

Expand Down
37 changes: 37 additions & 0 deletions extensions/hibernate-validator/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,20 @@
<groupId>jakarta.activation</groupId>
<artifactId>jakarta.activation-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.spec.javax.ws.rs</groupId>
<artifactId>jboss-jaxrs-api_2.1_spec</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.spec.javax.ws.rs</groupId>
<artifactId>jboss-jaxrs-api_3.0_spec</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.ws.rs</groupId>
<artifactId>jboss-jaxrs-api_2.1_spec</artifactId>
</dependency>
<dependency>
<groupId>org.graalvm.nativeimage</groupId>
<artifactId>svm</artifactId>
Expand Down Expand Up @@ -109,4 +121,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.jakarta-el-switch</recipe>
<recipe>io.quarkus.jakarta-jaxrs-switch</recipe>
</activeRecipes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
24 changes: 24 additions & 0 deletions extensions/jaeger/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,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.jakarta-angus-activation-switch</recipe>
</activeRecipes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
11 changes: 11 additions & 0 deletions extensions/keycloak-admin-client-reactive/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-core</artifactId>
<exclusions>
<exclusion>
<groupId>com.sun.activation</groupId>
<artifactId>jakarta.activation</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.sun.activation</groupId>
<artifactId>jakarta.activation</artifactId>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
Expand Down Expand Up @@ -91,6 +101,7 @@
<configuration>
<activeRecipes>
<recipe>io.quarkus.keycloak-admin-client</recipe>
<recipe>io.quarkus.jakarta-angus-activation-switch</recipe>
</activeRecipes>
</configuration>
</plugin>
Expand Down
4 changes: 4 additions & 0 deletions extensions/keycloak-admin-client/deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-rest-client-deployment</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-rest-client-jaxb-deployment</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-rest-client-jackson-deployment</artifactId>
Expand Down
27 changes: 27 additions & 0 deletions extensions/keycloak-admin-client/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,27 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-rest-client-jackson</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-rest-client-jaxb</artifactId>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-adapter-core</artifactId>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-core</artifactId>
<exclusions>
<exclusion>
<groupId>com.sun.activation</groupId>
<artifactId>jakarta.activation</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.sun.activation</groupId>
<artifactId>jakarta.activation</artifactId>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
Expand All @@ -38,6 +52,18 @@
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jackson2-provider</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-client</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxb-provider</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-core-spi</artifactId>
</exclusion>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
Expand Down Expand Up @@ -107,6 +133,7 @@
<configuration>
<activeRecipes>
<recipe>io.quarkus.keycloak-admin-client</recipe>
<recipe>io.quarkus.jakarta-angus-activation-switch</recipe>
</activeRecipes>
</configuration>
</plugin>
Expand Down
34 changes: 34 additions & 0 deletions extensions/keycloak-authorization/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-core</artifactId>
<exclusions>
<exclusion>
<groupId>com.sun.activation</groupId>
<artifactId>jakarta.activation</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.sun.activation</groupId>
<artifactId>jakarta.activation</artifactId>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
Expand Down Expand Up @@ -70,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.jakarta-angus-activation-switch</recipe>
</activeRecipes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Loading