diff --git a/bom/application/pom.xml b/bom/application/pom.xml index c80bc6035a74f..de795955fce20 100644 --- a/bom/application/pom.xml +++ b/bom/application/pom.xml @@ -39,7 +39,7 @@ 1.2 1.0 1.12.0 - 2.10.0 + 2.10.1 3.2.1 3.0.5 2.1.22 diff --git a/docs/src/main/asciidoc/config-reference.adoc b/docs/src/main/asciidoc/config-reference.adoc index 373576e542b86..f60a67478c202 100644 --- a/docs/src/main/asciidoc/config-reference.adoc +++ b/docs/src/main/asciidoc/config-reference.adoc @@ -62,6 +62,8 @@ the value `youshallnotpass` to the attribute `quarkus.datasource.password`. NOTE: Environment variables names follow the conversion rules specified by link:https://github.com/eclipse/microprofile-config/blob/master/spec/src/main/asciidoc/configsources.asciidoc#default-configsources[MicroProfile Config]. +NOTE: SmallRye Config specifies link:https://smallrye.io/smallrye-config/latest/config/environment-variables/[additional conversion rules]. + [[env-file]] === `.env` file in the current working directory @@ -501,8 +503,6 @@ The indexed property is sorted by their index before being added to the target ` indexes do not resolve to the target `Collection`, which means that the `Collection` result will store all values without any gaps. -IMPORTANT: Indexed Properties are not supported in Environment Variables. - [[configuring_quarkus]] == Configuring Quarkus @@ -555,7 +555,7 @@ Quarkus relies on link:https://github.com/smallrye/smallrye-config/[SmallRye Con * Hide secrets For more information, please check the -link:https://smallrye.io/docs/smallrye-config/index.html[SmallRye Config documentation]. +link:https://smallrye.io/smallrye-config/latest[SmallRye Config documentation]. == Configuration Reference diff --git a/docs/src/main/asciidoc/config.adoc b/docs/src/main/asciidoc/config.adoc index 1041e999fb8a2..c3c3f17ea1c74 100644 --- a/docs/src/main/asciidoc/config.adoc +++ b/docs/src/main/asciidoc/config.adoc @@ -128,7 +128,7 @@ public String hello() { ---- TIP: Use `@io.smallrye.config.ConfigMapping` annotation to group multiple configurations in a single interface. Please, -check the https://smallrye.io/docs/smallrye-config/main/mapping/mapping.html[Config Mappings] documentation. +check the https://smallrye.io/smallrye-config/latest/config/mappings/[Config Mappings] documentation. == Update the test @@ -240,4 +240,4 @@ Quarkus relies on link:https://github.com/smallrye/smallrye-config/[SmallRye Con * Hide secrets For more information, please check the -link:https://smallrye.io/docs/smallrye-config/index.html[SmallRye Config documentation]. +link:https://smallrye.io/smallrye-config/latest/[SmallRye Config documentation]. diff --git a/extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment/src/main/java/io/quarkus/resteasy/reactive/server/deployment/ResteasyReactiveScanningProcessor.java b/extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment/src/main/java/io/quarkus/resteasy/reactive/server/deployment/ResteasyReactiveScanningProcessor.java index be895cd1977ea..93047b9d68ee7 100644 --- a/extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment/src/main/java/io/quarkus/resteasy/reactive/server/deployment/ResteasyReactiveScanningProcessor.java +++ b/extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment/src/main/java/io/quarkus/resteasy/reactive/server/deployment/ResteasyReactiveScanningProcessor.java @@ -336,6 +336,9 @@ public void handleCustomAnnotatedMethods( generated.getGeneratedClassName()) .setRegisterAsBean(false)// it has already been made a bean .setPriority(generated.getPriority()); + if (!generated.getNameBindingNames().isEmpty()) { + builder.setNameBindingNames(generated.getNameBindingNames()); + } additionalContainerResponseFilters.produce(builder.build()); } } diff --git a/extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment/src/test/java/io/quarkus/resteasy/reactive/server/test/customproviders/CustomFiltersTest.java b/extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment/src/test/java/io/quarkus/resteasy/reactive/server/test/customproviders/CustomFiltersTest.java index fa010c71be852..e92475042209a 100644 --- a/extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment/src/test/java/io/quarkus/resteasy/reactive/server/test/customproviders/CustomFiltersTest.java +++ b/extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment/src/test/java/io/quarkus/resteasy/reactive/server/test/customproviders/CustomFiltersTest.java @@ -31,13 +31,14 @@ public JavaArchive get() { @Test public void testFilters() { - Headers headers = RestAssured.given().header("some-input", "bar").get("/custom/req") + Headers responseHeaders = RestAssured.given().header("some-input", "bar").get("/custom/req") .then().statusCode(200).body(Matchers.containsString("/custom/req-bar-null")).extract().headers(); - assertThat(headers.getValues("java-method")).containsOnly("filters"); + assertThat(responseHeaders.getValues("java-method")).containsOnly("filters"); Assertions.assertEquals(3, AssertContainerFilter.COUNT.get()); + assertThat(responseHeaders.getValues("very")).isEmpty(); - headers = RestAssured.given().header("some-input", "bar").get("/custom/metal") + responseHeaders = RestAssured.given().header("some-input", "bar").get("/custom/metal") .then().statusCode(200).body(Matchers.containsString("/custom/metal-bar-metal")).extract().headers(); - assertThat(headers.getValues("java-method")).containsOnly("metal"); + assertThat(responseHeaders.getValues("very")).containsOnly("heavy"); } } diff --git a/extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment/src/test/java/io/quarkus/resteasy/reactive/server/test/customproviders/MetalFilter.java b/extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment/src/test/java/io/quarkus/resteasy/reactive/server/test/customproviders/MetalFilter.java index f23d62aa2dfef..62335776d3343 100644 --- a/extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment/src/test/java/io/quarkus/resteasy/reactive/server/test/customproviders/MetalFilter.java +++ b/extensions/resteasy-reactive/quarkus-resteasy-reactive/deployment/src/test/java/io/quarkus/resteasy/reactive/server/test/customproviders/MetalFilter.java @@ -1,14 +1,22 @@ package io.quarkus.resteasy.reactive.server.test.customproviders; import javax.ws.rs.container.ContainerRequestContext; +import javax.ws.rs.container.ContainerResponseContext; import org.jboss.resteasy.reactive.server.ServerRequestFilter; +import org.jboss.resteasy.reactive.server.ServerResponseFilter; public class MetalFilter { @Metal @ServerRequestFilter - public void headBang(ContainerRequestContext requestContext) { + public void headBangIn(ContainerRequestContext requestContext) { requestContext.getHeaders().putSingle("heavy", "metal"); } + + @Metal + @ServerResponseFilter + public void headBangOut(ContainerResponseContext responseContext) { + responseContext.getHeaders().putSingle("very", "heavy"); + } } diff --git a/independent-projects/bootstrap/maven-plugin/src/main/java/io/quarkus/maven/ExtensionDescriptorMojo.java b/independent-projects/bootstrap/maven-plugin/src/main/java/io/quarkus/maven/ExtensionDescriptorMojo.java index 70243d097cb2a..8b52b3dcbef12 100644 --- a/independent-projects/bootstrap/maven-plugin/src/main/java/io/quarkus/maven/ExtensionDescriptorMojo.java +++ b/independent-projects/bootstrap/maven-plugin/src/main/java/io/quarkus/maven/ExtensionDescriptorMojo.java @@ -22,6 +22,7 @@ import io.quarkus.bootstrap.resolver.maven.workspace.LocalWorkspace; import io.quarkus.bootstrap.util.DependencyNodeUtils; import io.quarkus.fs.util.ZipUtils; +import io.quarkus.maven.ExtensionDescriptorMojo.RemovedResources; import io.quarkus.maven.capabilities.CapabilitiesConfig; import io.quarkus.maven.capabilities.CapabilityConfig; import io.quarkus.maven.dependency.ArtifactCoords; @@ -91,6 +92,11 @@ @Mojo(name = "extension-descriptor", defaultPhase = LifecyclePhase.PROCESS_RESOURCES, requiresDependencyResolution = ResolutionScope.COMPILE_PLUS_RUNTIME, threadSafe = true) public class ExtensionDescriptorMojo extends AbstractMojo { + public static class RemovedResources { + String key; + String resources; + } + private static final String GROUP_ID = "group-id"; private static final String ARTIFACT_ID = "artifact-id"; private static final String METADATA = "metadata"; @@ -164,7 +170,7 @@ public class ExtensionDescriptorMojo extends AbstractMojo { * but in the `META-INF/quarkus-extension.properties`. */ @Parameter - Map removedResources = Map.of(); + List removedResources = List.of(); /** * Artifacts that are always loaded parent first when running in dev or test mode. This is an advanced option @@ -321,18 +327,18 @@ public void execute() throws MojoExecutionException { } if (!removedResources.isEmpty()) { - for (Map.Entry entry : removedResources.entrySet()) { + for (RemovedResources entry : removedResources) { final ArtifactKey key; try { - key = ArtifactKey.fromString(entry.getKey()); + key = ArtifactKey.fromString(entry.key); } catch (IllegalArgumentException e) { throw new MojoExecutionException( - "Failed to parse removed resource '" + entry.getKey() + '=' + entry.getValue() + "'", e); + "Failed to parse removed resource '" + entry.key + '=' + entry.resources + "'", e); } - if (entry.getValue() == null || entry.getValue().isBlank()) { + if (entry.resources == null || entry.resources.isBlank()) { continue; } - final String[] resources = entry.getValue().split(","); + final String[] resources = entry.resources.split(","); if (resources.length == 0) { continue; } diff --git a/independent-projects/extension-maven-plugin/src/main/java/io/quarkus/maven/ExtensionDescriptorMojo.java b/independent-projects/extension-maven-plugin/src/main/java/io/quarkus/maven/ExtensionDescriptorMojo.java index 76c8c7e5ec7dc..415867e0b77d5 100644 --- a/independent-projects/extension-maven-plugin/src/main/java/io/quarkus/maven/ExtensionDescriptorMojo.java +++ b/independent-projects/extension-maven-plugin/src/main/java/io/quarkus/maven/ExtensionDescriptorMojo.java @@ -87,6 +87,11 @@ @Mojo(name = "extension-descriptor", defaultPhase = LifecyclePhase.PROCESS_RESOURCES, requiresDependencyResolution = ResolutionScope.COMPILE_PLUS_RUNTIME, threadSafe = true) public class ExtensionDescriptorMojo extends AbstractMojo { + public static class RemovedResources { + String key; + String resources; + } + private static final String GROUP_ID = "group-id"; private static final String ARTIFACT_ID = "artifact-id"; private static final String METADATA = "metadata"; @@ -169,7 +174,7 @@ public class ExtensionDescriptorMojo extends AbstractMojo { * but in the `META-INF/quarkus-extension.properties`. */ @Parameter - Map removedResources = Map.of(); + List removedResources = List.of(); /** * Artifacts that are always loaded parent first when running in dev or test mode. This is an advanced option @@ -336,18 +341,18 @@ public void execute() throws MojoExecutionException { } if (!removedResources.isEmpty()) { - for (Map.Entry entry : removedResources.entrySet()) { + for (RemovedResources entry : removedResources) { final ArtifactKey key; try { - key = ArtifactKey.fromString(entry.getKey()); + key = ArtifactKey.fromString(entry.key); } catch (IllegalArgumentException e) { throw new MojoExecutionException( - "Failed to parse removed resource '" + entry.getKey() + '=' + entry.getValue() + "'", e); + "Failed to parse removed resource '" + entry.key + '=' + entry.resources + "'", e); } - if (entry.getValue() == null || entry.getValue().isBlank()) { + if (entry.resources == null || entry.resources.isBlank()) { continue; } - final String[] resources = entry.getValue().split(","); + final String[] resources = entry.resources.split(","); if (resources.length == 0) { continue; } diff --git a/integration-tests/maven/src/test/resources-filtered/projects/extension-removed-resources/extension/runtime/pom.xml b/integration-tests/maven/src/test/resources-filtered/projects/extension-removed-resources/extension/runtime/pom.xml index 051cb701236d7..cb89f7886c31a 100644 --- a/integration-tests/maven/src/test/resources-filtered/projects/extension-removed-resources/extension/runtime/pom.xml +++ b/integration-tests/maven/src/test/resources-filtered/projects/extension-removed-resources/extension/runtime/pom.xml @@ -34,7 +34,10 @@ \${project.groupId}:\${project.artifactId}-deployment:\${project.version} - META-INF/a + + org.acme:acme-resources + META-INF/a + diff --git a/integration-tests/oidc-code-flow/src/test/java/io/quarkus/it/keycloak/CodeFlowTest.java b/integration-tests/oidc-code-flow/src/test/java/io/quarkus/it/keycloak/CodeFlowTest.java index 806236d21e3f9..4c7b5516cd835 100644 --- a/integration-tests/oidc-code-flow/src/test/java/io/quarkus/it/keycloak/CodeFlowTest.java +++ b/integration-tests/oidc-code-flow/src/test/java/io/quarkus/it/keycloak/CodeFlowTest.java @@ -978,7 +978,7 @@ private void checkSingleTokenCookie(Cookie tokenCookie, String type, boolean dec token = OidcUtils.decryptString(token, KeyUtils.createSecretKeyFromSecret("eUk1p7UB3nFiXZGUXi0uph1Y9p34YhBU")); tokenParts = token.split("\\."); } catch (Exception ex) { - fail("Token descryption has failed"); + fail("Token decryption has failed"); } } assertEquals(3, tokenParts.length);