Skip to content

Commit

Permalink
MP renaming, Q 3.7+
Browse files Browse the repository at this point in the history
  • Loading branch information
Karm committed Jan 23, 2024
1 parent 0bdf697 commit 36a04ae
Show file tree
Hide file tree
Showing 5 changed files with 263 additions and 3 deletions.
252 changes: 252 additions & 0 deletions apps/quarkus-full-microprofile/quarkus_3.7.x.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,252 @@
diff --git a/apps/quarkus-full-microprofile/pom.xml b/apps/quarkus-full-microprofile/pom.xml
index ce7df81..e654aba 100644
--- a/apps/quarkus-full-microprofile/pom.xml
+++ b/apps/quarkus-full-microprofile/pom.xml
@@ -61,11 +61,11 @@
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
- <artifactId>quarkus-smallrye-opentracing</artifactId>
+ <artifactId>quarkus-opentelemetry</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
- <artifactId>quarkus-rest-client</artifactId>
+ <artifactId>quarkus-resteasy-client</artifactId>
</dependency>
</dependencies>
<build>
diff --git a/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/HelloController.java b/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/HelloController.java
index 0694ce6..88d552c 100644
--- a/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/HelloController.java
+++ b/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/HelloController.java
@@ -1,8 +1,8 @@
package com.example.quarkus;

-import javax.inject.Singleton;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
+import jakarta.inject.Singleton;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;

@Path("/hello")
@Singleton
diff --git a/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/QuarkusRestApplication.java b/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/QuarkusRestApplication.java
index 068ba12..410a130 100644
--- a/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/QuarkusRestApplication.java
+++ b/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/QuarkusRestApplication.java
@@ -1,7 +1,7 @@
package com.example.quarkus;

-import javax.ws.rs.ApplicationPath;
-import javax.ws.rs.core.Application;
+import jakarta.ws.rs.ApplicationPath;
+import jakarta.ws.rs.core.Application;

@ApplicationPath("/data")
public class QuarkusRestApplication extends Application {
diff --git a/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/client/ClientController.java b/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/client/ClientController.java
index 0f593eb..7360fcc 100644
--- a/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/client/ClientController.java
+++ b/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/client/ClientController.java
@@ -2,11 +2,11 @@ package com.example.quarkus.client;

import org.eclipse.microprofile.rest.client.inject.RestClient;

-import javax.enterprise.context.ApplicationScoped;
-import javax.inject.Inject;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
+import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.inject.Inject;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;

@Path("/client")
@ApplicationScoped
diff --git a/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/client/Service.java b/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/client/Service.java
index ac9a4a5..35bcb99 100644
--- a/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/client/Service.java
+++ b/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/client/Service.java
@@ -2,10 +2,10 @@ package com.example.quarkus.client;

import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;

-import javax.enterprise.context.ApplicationScoped;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
+import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;

@RegisterRestClient
@ApplicationScoped
diff --git a/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/client/ServiceController.java b/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/client/ServiceController.java
index 24a228d..6ec43f9 100644
--- a/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/client/ServiceController.java
+++ b/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/client/ServiceController.java
@@ -1,8 +1,8 @@
package com.example.quarkus.client;

-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;

@Path("/client/service")
public class ServiceController {
diff --git a/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/config/ConfigTestController.java b/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/config/ConfigTestController.java
index 8119c23..517fe6f 100644
--- a/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/config/ConfigTestController.java
+++ b/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/config/ConfigTestController.java
@@ -4,10 +4,10 @@ import org.eclipse.microprofile.config.Config;
import org.eclipse.microprofile.config.ConfigProvider;
import org.eclipse.microprofile.config.inject.ConfigProperty;

-import javax.enterprise.context.RequestScoped;
-import javax.inject.Inject;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
+import jakarta.enterprise.context.RequestScoped;
+import jakarta.inject.Inject;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;

/**
* !!! DO NOT TOUCH THE SOURCE WITHOUT EDITING GDBSession.java !!!
diff --git a/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/health/ServiceLiveHealthCheck.java b/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/health/ServiceLiveHealthCheck.java
index fea754c..d1ad0a6 100644
--- a/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/health/ServiceLiveHealthCheck.java
+++ b/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/health/ServiceLiveHealthCheck.java
@@ -4,7 +4,7 @@ import org.eclipse.microprofile.health.HealthCheck;
import org.eclipse.microprofile.health.HealthCheckResponse;
import org.eclipse.microprofile.health.Liveness;

-import javax.enterprise.context.ApplicationScoped;
+import jakarta.enterprise.context.ApplicationScoped;

@Liveness
@ApplicationScoped
diff --git a/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/health/ServiceReadyHealthCheck.java b/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/health/ServiceReadyHealthCheck.java
index 6bb6374..cd7ac7a 100644
--- a/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/health/ServiceReadyHealthCheck.java
+++ b/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/health/ServiceReadyHealthCheck.java
@@ -4,7 +4,7 @@ import org.eclipse.microprofile.health.HealthCheck;
import org.eclipse.microprofile.health.HealthCheckResponse;
import org.eclipse.microprofile.health.Readiness;

-import javax.enterprise.context.ApplicationScoped;
+import jakarta.enterprise.context.ApplicationScoped;

@Readiness
@ApplicationScoped
diff --git a/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/metric/MetricController.java b/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/metric/MetricController.java
index 1f4c2df..db4c9fa 100644
--- a/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/metric/MetricController.java
+++ b/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/metric/MetricController.java
@@ -6,10 +6,10 @@ import org.eclipse.microprofile.metrics.annotation.Gauge;
import org.eclipse.microprofile.metrics.annotation.Metric;
import org.eclipse.microprofile.metrics.annotation.Timed;

-import javax.enterprise.context.ApplicationScoped;
-import javax.inject.Inject;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
+import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.inject.Inject;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
import java.util.Random;

@Path("/metric")
diff --git a/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/resilient/ResilienceController.java b/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/resilient/ResilienceController.java
index 04cf5fb..fc34f8e 100644
--- a/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/resilient/ResilienceController.java
+++ b/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/resilient/ResilienceController.java
@@ -3,9 +3,9 @@ package com.example.quarkus.resilient;
import org.eclipse.microprofile.faulttolerance.Fallback;
import org.eclipse.microprofile.faulttolerance.Timeout;

-import javax.enterprise.context.ApplicationScoped;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
+import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;

@Path("/resilience")
@ApplicationScoped
diff --git a/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/secure/ProtectedController.java b/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/secure/ProtectedController.java
index 4447db7..1d54637 100644
--- a/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/secure/ProtectedController.java
+++ b/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/secure/ProtectedController.java
@@ -3,11 +3,11 @@ package com.example.quarkus.secure;
import org.eclipse.microprofile.jwt.Claim;
import org.eclipse.microprofile.jwt.ClaimValue;

-import javax.annotation.security.RolesAllowed;
-import javax.enterprise.context.RequestScoped;
-import javax.inject.Inject;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
+import jakarta.annotation.security.RolesAllowed;
+import jakarta.enterprise.context.RequestScoped;
+import jakarta.inject.Inject;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;

@Path("/protected")
@RequestScoped
diff --git a/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/secure/TestSecureController.java b/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/secure/TestSecureController.java
index fb82305..a95c3f0 100644
--- a/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/secure/TestSecureController.java
+++ b/apps/quarkus-full-microprofile/src/main/java/com/example/quarkus/secure/TestSecureController.java
@@ -5,14 +5,14 @@ import io.vertx.ext.auth.PubSecKeyOptions;
import io.vertx.ext.auth.jwt.JWTAuth;
import io.vertx.ext.auth.jwt.JWTAuthOptions;

-import javax.annotation.PostConstruct;
-import javax.enterprise.context.ApplicationScoped;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.WebApplicationException;
-import javax.ws.rs.client.ClientBuilder;
-import javax.ws.rs.client.WebTarget;
-import javax.ws.rs.core.Response;
+import jakarta.annotation.PostConstruct;
+import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.WebApplicationException;
+import jakarta.ws.rs.client.ClientBuilder;
+import jakarta.ws.rs.client.WebTarget;
+import jakarta.ws.rs.core.Response;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
diff --git a/apps/quarkus-full-microprofile/src/main/resources/application.properties b/apps/quarkus-full-microprofile/src/main/resources/application.properties
index 30c3d85..aacd280 100644
--- a/apps/quarkus-full-microprofile/src/main/resources/application.properties
+++ b/apps/quarkus-full-microprofile/src/main/resources/application.properties
@@ -5,8 +5,10 @@ quarkus.ssl.native=true
mp.jwt.verify.publickey.location=META-INF/resources/publicKey.pem
mp.jwt.verify.issuer=https://server.example.com
quarkus.smallrye-jwt.enabled=true
-quarkus.jaeger.service-name=Demo-Service-A
-quarkus.jaeger.sampler-type=const
-quarkus.jaeger.sampler-param=1
-quarkus.jaeger.endpoint=http://localhost:14268/api/traces
+quarkus.otel.traces.exporter=cdi
+quarkus.otel.traces.sampler=parentbased_always_on
+quarkus.otel.traces.eusp.enabled=true
+quarkus.otel.service.name=Demo-Service-A
+quarkus.otel.exporter.otlp.endpoint=http://localhost:4317
+quarkus.otel.exporter.otlp.traces.endpoint=http://localhost:4317
quarkus.native.resources.includes=privateKey.pem
2 changes: 2 additions & 0 deletions apps/quarkus-full-microprofile/threshold.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ linux.executable.size.threshold.kB=79000
windows.time.to.first.ok.request.threshold.ms=1537
windows.RSS.threshold.kB=120000
windows.executable.size.threshold.kB=79000
@IfQuarkusVersion(min ="3.7.0")
linux.executable.size.threshold.kB=79700
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,9 @@ public void debugSymbolsQuarkus(TestInfo testInfo) throws IOException, Interrupt
final String cn = testInfo.getTestClass().get().getCanonicalName();
final String mn = testInfo.getTestMethod().get().getName();
final String patch;
if (QUARKUS_VERSION.compareTo(new QuarkusVersion("3.6.0")) >= 0 || QUARKUS_VERSION.isSnapshot()) {
if (QUARKUS_VERSION.compareTo(new QuarkusVersion("3.7.0")) >= 0 || QUARKUS_VERSION.isSnapshot()) {
patch = "quarkus_3.7.x.patch";
} else if (QUARKUS_VERSION.compareTo(new QuarkusVersion("3.6.0")) >= 0) {
patch = "quarkus_3.6.x.patch";
} else if (QUARKUS_VERSION.majorIs(3)) {
patch = "quarkus_3.x.patch";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,9 @@ public void testQuarkusFullMicroProfile(TestInfo testInfo) throws IOException, I
final String mn = testInfo.getTestMethod().get().getName();
final List<Map<String, String>> reports = new ArrayList<>(2);
final String patch;
if (QUARKUS_VERSION.compareTo(new QuarkusVersion("3.6.0")) >= 0 || QUARKUS_VERSION.isSnapshot()) {
if (QUARKUS_VERSION.compareTo(new QuarkusVersion("3.7.0")) >= 0 || QUARKUS_VERSION.isSnapshot()) {
patch = "quarkus_3.7.x.patch";
} else if (QUARKUS_VERSION.compareTo(new QuarkusVersion("3.6.0")) >= 0) {
patch = "quarkus_3.6.x.patch";
} else if (QUARKUS_VERSION.majorIs(3)) {
patch = "quarkus_3.x.patch";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ public void quarkusFullMicroProfile(TestInfo testInfo) throws IOException, Inter
}

final String patch;
if (QUARKUS_VERSION.compareTo(new QuarkusVersion("3.6.0")) >= 0 || QUARKUS_VERSION.isSnapshot()) {
if (QUARKUS_VERSION.compareTo(new QuarkusVersion("3.7.0")) >= 0 || QUARKUS_VERSION.isSnapshot()) {
patch = "quarkus_3.7.x.patch";
} else if (QUARKUS_VERSION.compareTo(new QuarkusVersion("3.6.0")) >= 0) {
patch = "quarkus_3.6.x.patch";
} else if (QUARKUS_VERSION.majorIs(3)) {
patch = "quarkus_3.x.patch";
Expand Down

0 comments on commit 36a04ae

Please sign in to comment.