${searchBox}
${schedulerButton}
@@ -135,7 +137,6 @@ export class QwcSchedulerScheduledMethods extends LitElement {
`;
- }
}
_scheduleRenderer(scheduledMethod) {
diff --git a/extensions/smallrye-fault-tolerance/deployment/src/main/resources/dev-ui/qwc-fault-tolerance-methods.js b/extensions/smallrye-fault-tolerance/deployment/src/main/resources/dev-ui/qwc-fault-tolerance-methods.js
index 2ea5e05e9c107..30dfbb9ab9cf9 100644
--- a/extensions/smallrye-fault-tolerance/deployment/src/main/resources/dev-ui/qwc-fault-tolerance-methods.js
+++ b/extensions/smallrye-fault-tolerance/deployment/src/main/resources/dev-ui/qwc-fault-tolerance-methods.js
@@ -1,5 +1,4 @@
import {css, html, LitElement} from 'lit';
-import {until} from 'lit/directives/until.js';
import {JsonRpc} from 'jsonrpc';
import '@vaadin/grid';
import {columnBodyRenderer} from '@vaadin/grid/lit.js';
@@ -29,12 +28,15 @@ export class QwcFaultToleranceMethods extends LitElement {
}
render() {
- return html`${until(this._renderGuardedMethods(), html`
`)}`;
+ if (this._guardedMethods) {
+ return this._renderGuardedMethods();
+ } else {
+ return html`
`;
+ }
}
_renderGuardedMethods() {
- if (this._guardedMethods) {
- return html`
+ return html`
`;
- }
}
_renderBeanClass(guardedMethod) {
diff --git a/extensions/smallrye-openapi/deployment/src/main/java/io/quarkus/smallrye/openapi/deployment/devui/OpenApiDevUIProcessor.java b/extensions/smallrye-openapi/deployment/src/main/java/io/quarkus/smallrye/openapi/deployment/devui/OpenApiDevUIProcessor.java
index e98b6a9f9f230..3e5cc8b608051 100644
--- a/extensions/smallrye-openapi/deployment/src/main/java/io/quarkus/smallrye/openapi/deployment/devui/OpenApiDevUIProcessor.java
+++ b/extensions/smallrye-openapi/deployment/src/main/java/io/quarkus/smallrye/openapi/deployment/devui/OpenApiDevUIProcessor.java
@@ -4,24 +4,28 @@
import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.devui.spi.page.CardPageBuildItem;
import io.quarkus.devui.spi.page.Page;
+import io.quarkus.smallrye.openapi.common.deployment.SmallRyeOpenApiConfig;
+import io.quarkus.swaggerui.deployment.SwaggerUiConfig;
import io.quarkus.vertx.http.deployment.NonApplicationRootPathBuildItem;
public class OpenApiDevUIProcessor {
@BuildStep(onlyIf = IsDevelopment.class)
- public CardPageBuildItem pages(NonApplicationRootPathBuildItem nonApplicationRootPathBuildItem) {
+ public CardPageBuildItem pages(NonApplicationRootPathBuildItem nonApplicationRootPathBuildItem,
+ SwaggerUiConfig swaggerUiConfig, SmallRyeOpenApiConfig openApiConfig) {
- String uiPath = nonApplicationRootPathBuildItem.resolvePath("swagger-ui");
+ String uiPath = nonApplicationRootPathBuildItem.resolvePath(swaggerUiConfig.path);
+ String schemaPath = nonApplicationRootPathBuildItem.resolvePath(openApiConfig.path);
CardPageBuildItem cardPageBuildItem = new CardPageBuildItem();
cardPageBuildItem.addPage(Page.externalPageBuilder("Schema yaml")
- .url(nonApplicationRootPathBuildItem.resolvePath("openapi"))
+ .url(nonApplicationRootPathBuildItem.resolvePath(schemaPath))
.isYamlContent()
.icon("font-awesome-solid:file-lines"));
cardPageBuildItem.addPage(Page.externalPageBuilder("Schema json")
- .url(nonApplicationRootPathBuildItem.resolvePath("openapi") + "?format=json")
+ .url(nonApplicationRootPathBuildItem.resolvePath(schemaPath) + "?format=json")
.isJsonContent()
.icon("font-awesome-solid:file-code"));
diff --git a/extensions/smallrye-reactive-messaging-rabbitmq/deployment/src/main/resources/dev-ui/qwc-rabbitmq-card.js b/extensions/smallrye-reactive-messaging-rabbitmq/deployment/src/main/resources/dev-ui/qwc-rabbitmq-card.js
index d9040de5d2550..0b9da2135fb4a 100644
--- a/extensions/smallrye-reactive-messaging-rabbitmq/deployment/src/main/resources/dev-ui/qwc-rabbitmq-card.js
+++ b/extensions/smallrye-reactive-messaging-rabbitmq/deployment/src/main/resources/dev-ui/qwc-rabbitmq-card.js
@@ -1,7 +1,7 @@
import { LitElement, html, css} from 'lit';
import { pages } from 'build-time-data';
import { JsonRpc } from 'jsonrpc';
-import 'qwc/qwc-extension-link.js';
+import 'qwc-extension-link';
const NAME = "Reactive Messaging - RabbitMQ";
export class QwcRabbitMqCard extends LitElement {
@@ -44,13 +44,6 @@ export class QwcRabbitMqCard extends LitElement {
_externalUrl: {state: true}
};
- constructor() {
- super();
- if(!this.extensionName){
- this.extensionName = NAME;
- }
- }
-
connectedCallback() {
super.connectedCallback();
this.jsonRpc.getRabbitMqPort().then(jsonRpcResponse => {
@@ -64,8 +57,8 @@ export class QwcRabbitMqCard extends LitElement {
@@ -77,17 +70,19 @@ export class QwcRabbitMqCard extends LitElement {
}
_renderCardLinks(){
- return html`
-
-
- `;
+ if(this._port){
+ return html`
+
+
+ `;
+ }
}
}
diff --git a/extensions/smallrye-reactive-messaging/deployment/src/main/resources/dev-ui/qwc-smallrye-reactive-messaging-channels.js b/extensions/smallrye-reactive-messaging/deployment/src/main/resources/dev-ui/qwc-smallrye-reactive-messaging-channels.js
index 2f3afc6022f1b..e2cef7692aff2 100644
--- a/extensions/smallrye-reactive-messaging/deployment/src/main/resources/dev-ui/qwc-smallrye-reactive-messaging-channels.js
+++ b/extensions/smallrye-reactive-messaging/deployment/src/main/resources/dev-ui/qwc-smallrye-reactive-messaging-channels.js
@@ -2,7 +2,6 @@ import { LitElement, html, css} from 'lit';
import { JsonRpc } from 'jsonrpc';
import '@vaadin/icon';
import '@vaadin/button';
-import { until } from 'lit/directives/until.js';
import '@vaadin/grid';
import { columnBodyRenderer } from '@vaadin/grid/lit.js';
import '@vaadin/grid/vaadin-grid-sort-column.js';
@@ -46,12 +45,15 @@ export class QwcSmallryeReactiveMessagingChannels extends LitElement {
* @returns {*}
*/
render() {
- return html`${until(this._renderChannelTable(), html`
Loading channels...`)}`;
+ if (this._channels) {
+ return this._renderChannelTable();
+ } else {
+ return html`
Loading channels...`;
+ }
}
_renderChannelTable() {
- if (this._channels) {
- return html`
+ return html`
`;
- }
}
_channelNameRenderer(channel) {
diff --git a/extensions/swagger-ui/deployment/src/main/java/io/quarkus/swaggerui/deployment/SwaggerUiConfig.java b/extensions/swagger-ui/deployment/src/main/java/io/quarkus/swaggerui/deployment/SwaggerUiConfig.java
index b8d2180832a19..deb0ad261eef9 100644
--- a/extensions/swagger-ui/deployment/src/main/java/io/quarkus/swaggerui/deployment/SwaggerUiConfig.java
+++ b/extensions/swagger-ui/deployment/src/main/java/io/quarkus/swaggerui/deployment/SwaggerUiConfig.java
@@ -21,7 +21,7 @@ public class SwaggerUiConfig {
* By default, this value will be resolved as a path relative to `${quarkus.http.non-application-root-path}`.
*/
@ConfigItem(defaultValue = "swagger-ui")
- String path;
+ public String path;
/**
* If this should be included every time. By default, this is only included when the application is running
diff --git a/extensions/vertx-http/deployment/src/main/java/io/quarkus/devui/deployment/BuildTimeContentProcessor.java b/extensions/vertx-http/deployment/src/main/java/io/quarkus/devui/deployment/BuildTimeContentProcessor.java
index e95d614d3389a..cc92602140a74 100644
--- a/extensions/vertx-http/deployment/src/main/java/io/quarkus/devui/deployment/BuildTimeContentProcessor.java
+++ b/extensions/vertx-http/deployment/src/main/java/io/quarkus/devui/deployment/BuildTimeContentProcessor.java
@@ -83,6 +83,7 @@ InternalImportMapBuildItem createKnownInternalImportMap(NonApplicationRootPathBu
internalImportMapBuildItem.add("qwc/", contextRoot + "qwc/");
internalImportMapBuildItem.add("qwc-hot-reload-element", contextRoot + "qwc/qwc-hot-reload-element.js");
internalImportMapBuildItem.add("qwc-server-log", contextRoot + "qwc/qwc-server-log.js");
+ internalImportMapBuildItem.add("qwc-extension-link", contextRoot + "qwc/qwc-extension-link.js");
// Quarkus UI
internalImportMapBuildItem.add("qui/", contextRoot + "qui/");
internalImportMapBuildItem.add("qui-card", contextRoot + "qui/qui-card.js");
diff --git a/extensions/vertx-http/dev-ui-resources/src/main/resources/dev-ui/qwc/qwc-configuration.js b/extensions/vertx-http/dev-ui-resources/src/main/resources/dev-ui/qwc/qwc-configuration.js
index 114c84c75e924..36cc482fe1e84 100644
--- a/extensions/vertx-http/dev-ui-resources/src/main/resources/dev-ui/qwc/qwc-configuration.js
+++ b/extensions/vertx-http/dev-ui-resources/src/main/resources/dev-ui/qwc/qwc-configuration.js
@@ -1,7 +1,6 @@
import { LitElement, html, css } from 'lit';
import { JsonRpc } from 'jsonrpc';
import { RouterController } from 'router-controller';
-import { until } from 'lit/directives/until.js';
import '@vaadin/grid';
import 'qui/qui-alert.js';
import { columnBodyRenderer } from '@vaadin/grid/lit.js';
@@ -106,7 +105,11 @@ export class QwcConfiguration extends observeState(LitElement) {
}
render() {
- return html`${until(this._render(), html`
Loading configuration properties...`)}`;
+ if (this._filtered && this._values) {
+ return this._render();
+ } else {
+ return html`
Loading configuration properties...`;
+ }
}
_match(value, term) {
@@ -138,8 +141,7 @@ export class QwcConfiguration extends observeState(LitElement) {
}
_render() {
- if (this._filtered && this._values) {
- return html`
+ return html`
${this._renderGrid()}
`;
- }
}
_renderGrid(){
diff --git a/extensions/vertx-http/dev-ui-resources/src/main/resources/dev-ui/qwc/qwc-extension-link.js b/extensions/vertx-http/dev-ui-resources/src/main/resources/dev-ui/qwc/qwc-extension-link.js
index c802d6126c788..c5d670deb9e5e 100644
--- a/extensions/vertx-http/dev-ui-resources/src/main/resources/dev-ui/qwc/qwc-extension-link.js
+++ b/extensions/vertx-http/dev-ui-resources/src/main/resources/dev-ui/qwc/qwc-extension-link.js
@@ -180,12 +180,10 @@ export class QwcExtensionLink extends QwcHotReloadElement {
}
render() {
- if(this.path){
- if(!this.embed) {
- return html`${this.renderLink(this._effectiveExternalUrl, true, "_blank")}`;
- }else{
- return html`${this.renderLink(this.path, false, "_self")}`;
- }
+ if(!this.embed && this._effectiveExternalUrl) {
+ return html`${this.renderLink(this._effectiveExternalUrl, true, "_blank")}`;
+ }else if(this.path){
+ return html`${this.renderLink(this.path, false, "_self")}`;
}
}
diff --git a/extensions/vertx-http/dev-ui-resources/src/main/resources/dev-ui/qwc/qwc-extension.js b/extensions/vertx-http/dev-ui-resources/src/main/resources/dev-ui/qwc/qwc-extension.js
index 931ad190ec6be..d6162d2d9b7c9 100644
--- a/extensions/vertx-http/dev-ui-resources/src/main/resources/dev-ui/qwc/qwc-extension.js
+++ b/extensions/vertx-http/dev-ui-resources/src/main/resources/dev-ui/qwc/qwc-extension.js
@@ -2,6 +2,7 @@ import { LitElement, html, css} from 'lit';
import '@vaadin/icon';
import '@vaadin/dialog';
import { dialogHeaderRenderer, dialogRenderer } from '@vaadin/dialog/lit.js';
+import 'qui-badge';
/**
* This component represent one extension
@@ -41,7 +42,6 @@ export class QwcExtension extends LitElement {
display: flex;
flex-direction: row;
justify-content: space-between;
- visibility:hidden;
}
.card-footer a {
@@ -60,15 +60,15 @@ export class QwcExtension extends LitElement {
color: var(--lumo-contrast-70pct);
}
- .active:hover .card-footer, .active:hover .guide {
+ .active:hover .config, .active:hover .more, .active:hover .guide {
visibility:visible;
}
- .inactive:hover .card-footer, .inactive:hover .guide {
+ .inactive:hover .config, .inactive:hover .more, .inactive:hover .guide {
visibility:visible;
}
- .guide{
+ .guide, .more, .config {
visibility:hidden;
}
@@ -141,14 +141,39 @@ export class QwcExtension extends LitElement {
_footerTemplate() {
return html`
`;
}
+ _renderStatus(){
+ var l = this._statusLevelOnCard();
+
+ if(l) {
+ return html`
${this.status.toUpperCase()}`;
+ }
+ }
+
+ _statusLevelOnCard(){
+ if(this.status === "experimental") {
+ return "warning";
+ } else if(this.status === "preview") {
+ return "contrast";
+ }
+ return null;
+ }
+
+ _statusLevel(){
+ if(this.status === "stable") {
+ return "success";
+ }
+ return this._statusLevelOnCard();
+ }
+
_renderDialog(){
return html`
@@ -181,7 +206,7 @@ export class QwcExtension extends LitElement {
Status |
- ${this.status} |
+ ${this.status.toUpperCase()} |
Config Filter |
diff --git a/extensions/vertx-http/dev-ui-resources/src/main/resources/dev-ui/qwc/qwc-extensions.js b/extensions/vertx-http/dev-ui-resources/src/main/resources/dev-ui/qwc/qwc-extensions.js
index bbe779ac6069d..6b845302c3c86 100644
--- a/extensions/vertx-http/dev-ui-resources/src/main/resources/dev-ui/qwc/qwc-extensions.js
+++ b/extensions/vertx-http/dev-ui-resources/src/main/resources/dev-ui/qwc/qwc-extensions.js
@@ -5,7 +5,6 @@ import { devuiState } from 'devui-state';
import { observeState } from 'lit-element-state';
import 'qwc/qwc-extension.js';
import 'qwc/qwc-extension-link.js';
-import 'qui-badge';
/**
@@ -115,7 +114,6 @@ export class QwcExtensions extends observeState(LitElement) {
return html`
- ${this._renderExperimentalBadge(extension)}
${extension.description}
${this._renderCardLinks(extension)}
@@ -161,18 +159,10 @@ export class QwcExtensions extends observeState(LitElement) {
providesCapabilities="${extension.providesCapabilities}"
extensionDependencies="${extension.extensionDependencies}">
- ${this._renderExperimentalBadge(extension)}
${extension.description}
`;
}
}
-
- _renderExperimentalBadge(extension){
- if(extension.status === "experimental") {
- return html`
EXPERIMENTAL`;
- }
- }
-
}
customElements.define('qwc-extensions', QwcExtensions);
diff --git a/extensions/vertx-http/dev-ui-resources/src/main/resources/dev-ui/qwc/qwc-footer.js b/extensions/vertx-http/dev-ui-resources/src/main/resources/dev-ui/qwc/qwc-footer.js
index 316822a22cffe..fa293774b4938 100644
--- a/extensions/vertx-http/dev-ui-resources/src/main/resources/dev-ui/qwc/qwc-footer.js
+++ b/extensions/vertx-http/dev-ui-resources/src/main/resources/dev-ui/qwc/qwc-footer.js
@@ -20,12 +20,6 @@ export class QwcFooter extends observeState(LitElement) {
static styles = css`
- vaadin-menu-bar {
- --lumo-size-m: 10px;
- --lumo-space-xs: 0.7rem;
- --_lumo-button-background-color: transparent;
- }
-
.openIcon {
cursor: pointer;
font-size: var(--lumo-font-size-s);
@@ -54,10 +48,61 @@ export class QwcFooter extends observeState(LitElement) {
.dragOpen {
overflow: hidden;
- height: 3px;
+ height: 4px;
cursor: row-resize;
background: var(--lumo-contrast-10pct);
}
+
+ .resizeIcon {
+ display: none;
+ }
+
+ @media screen and (max-width: 1600px) {
+ .dragOpen {
+ height: 5px;
+ background: var(--lumo-contrast-10pct);
+ }
+ }
+
+ @media screen and (max-width: 1280px) {
+ .dragOpen {
+ height: 6px;
+ background: var(--lumo-contrast-20pct);
+ }
+ #footer {
+ margin-right: 0px;
+ margin-left: 0px;
+ border-radius: 0px 0px 0px 0px;
+ }
+ .resizeIcon {
+ display: inline;
+ }
+ }
+
+ @media screen and (max-width: 1152px) {
+ .dragOpen {
+ height: 7px;
+ background: var(--lumo-contrast-20pct);
+ }
+ }
+
+ @media screen and (max-width: 1024px) {
+ .dragOpen {
+ height: 7px;
+ background: var(--lumo-contrast-30pct);
+ }
+ }
+
+ @media screen and (max-width: 900px) {
+ .dragOpen {
+ height: 8px;
+ background: var(--lumo-contrast-30pct);
+ }
+ }
+
+ vaadin-menu-bar-button {
+ background: var(--lumo-contrast-5pct);
+ }
.dragOpen:hover {
background: var(--quarkus-blue);
@@ -211,6 +256,8 @@ export class QwcFooter extends observeState(LitElement) {
${this._renderControls()}
+ ${this._renderResizeIcon()}
+
`;
}
@@ -227,7 +274,8 @@ export class QwcFooter extends observeState(LitElement) {
}
_renderControls(){
- return html`
`;
@@ -259,6 +307,10 @@ export class QwcFooter extends observeState(LitElement) {
this.storageControl.set('selected-tab', this._selectedTab);
}
+ _renderResizeIcon(){
+ return html``;
+ }
+
_mousedown(e){
this._originalHeight = this._height;
this._originalMouseY = e.y;
diff --git a/extensions/vertx-http/dev-ui-resources/src/main/resources/dev-ui/qwc/qwc-menu.js b/extensions/vertx-http/dev-ui-resources/src/main/resources/dev-ui/qwc/qwc-menu.js
index 4632b74ba1f26..1050f1e5da2df 100644
--- a/extensions/vertx-http/dev-ui-resources/src/main/resources/dev-ui/qwc/qwc-menu.js
+++ b/extensions/vertx-http/dev-ui-resources/src/main/resources/dev-ui/qwc/qwc-menu.js
@@ -41,6 +41,19 @@ export class QwcMenu extends observeState(LitElement) {
color: var(--lumo-primary-color-50pct);
}
+ @media screen and (max-width: 1280px) {
+ .menuSizeControl, .quarkusVersion, .item-text {
+ display: none;
+ }
+ .menu, .left {
+ width: 35px!important;
+ }
+ vaadin-icon {
+ width: var(--lumo-icon-size-s);
+ height: var(--lumo-icon-size-s);
+ }
+ }
+
.item {
display: flex;
flex-direction: row;
diff --git a/extensions/vertx/deployment/src/main/java/io/quarkus/vertx/deployment/EventBusCodecProcessor.java b/extensions/vertx/deployment/src/main/java/io/quarkus/vertx/deployment/EventBusCodecProcessor.java
index f64a54cdab508..8dd0ee0830df5 100644
--- a/extensions/vertx/deployment/src/main/java/io/quarkus/vertx/deployment/EventBusCodecProcessor.java
+++ b/extensions/vertx/deployment/src/main/java/io/quarkus/vertx/deployment/EventBusCodecProcessor.java
@@ -29,6 +29,7 @@
import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
+import io.quarkus.vertx.LocalEventBusCodec;
import io.vertx.core.buffer.Buffer;
import io.vertx.core.json.JsonArray;
import io.vertx.core.json.JsonObject;
@@ -38,6 +39,7 @@ public class EventBusCodecProcessor {
private static final Logger LOGGER = Logger.getLogger(EventBusCodecProcessor.class.getName());
private static final DotName OBJECT = DotName.createSimple(Object.class);
+ private static final DotName LOCAL_EVENT_BUT_CODEC = DotName.createSimple(LocalEventBusCodec.class);
@BuildStep
public void registerCodecs(
@@ -101,17 +103,25 @@ public void registerCodecs(
// But do not override the existing ones
for (Map.Entry entry : codecByTypes.entrySet()) {
// we do not consider Object as it would be a mess
- if (OBJECT.equals(entry.getKey())) {
+ DotName typeDotName = entry.getKey();
+ if (OBJECT.equals(typeDotName)) {
continue;
}
- Set subclasses = combinedIndex.getIndex().getAllKnownSubclasses(entry.getKey()).stream()
+ DotName codecDotName = entry.getValue();
+ // we have to limit subclasses to codecs we know that have unique name per-instance
+ // see: https://github.com/quarkusio/quarkus/issues/33458
+ if (!LOCAL_EVENT_BUT_CODEC.equals(codecDotName)) {
+ continue;
+ }
+
+ Set subclasses = combinedIndex.getIndex().getAllKnownSubclasses(typeDotName).stream()
.map(ci -> ci.name())
.filter(d -> !codecByTypes.containsKey(d))
.collect(Collectors.toSet());
for (DotName subclass : subclasses) {
- messageCodecs.produce(new MessageCodecBuildItem(subclass.toString(), entry.getValue().toString()));
+ messageCodecs.produce(new MessageCodecBuildItem(subclass.toString(), codecDotName.toString()));
}
}
diff --git a/independent-projects/arc/pom.xml b/independent-projects/arc/pom.xml
index 697550659c77f..fa9dc00ae202f 100644
--- a/independent-projects/arc/pom.xml
+++ b/independent-projects/arc/pom.xml
@@ -6,9 +6,10 @@
4.0.0
- org.jboss
- jboss-parent
- 39
+ io.quarkus
+ quarkus-parent
+ 999-SNAPSHOT
+ ../parent/pom.xml
io.quarkus.arc
arc-parent
diff --git a/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/BeanConfiguratorBase.java b/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/BeanConfiguratorBase.java
index 8e994d19333a6..05526bf52f0bc 100644
--- a/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/BeanConfiguratorBase.java
+++ b/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/BeanConfiguratorBase.java
@@ -257,10 +257,9 @@ public THIS providerType(Type providerType) {
* @see SyntheticCreationalContext
*/
public THIS addInjectionPoint(Type requiredType, AnnotationInstance... requiredQualifiers) {
- if (requiredQualifiers.length == 0) {
- requiredQualifiers = new AnnotationInstance[] { AnnotationInstance.builder(Default.class).build() };
- }
- this.injectionPoints.add(new TypeAndQualifiers(requiredType, Set.of(requiredQualifiers)));
+ this.injectionPoints.add(new TypeAndQualifiers(requiredType,
+ requiredQualifiers.length == 0 ? Set.of(AnnotationInstance.builder(Default.class).build())
+ : Set.of(requiredQualifiers)));
return self();
}
diff --git a/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/BeanGenerator.java b/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/BeanGenerator.java
index 491a5855b0f39..7b0ace32b5150 100644
--- a/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/BeanGenerator.java
+++ b/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/BeanGenerator.java
@@ -715,13 +715,7 @@ protected MethodCreator initConstructor(ClassOutput classOutput, ClassCreator be
reflectionRegistration, injectionPointAnnotationsPredicate));
} else {
// Not a built-in bean
- if (BuiltinScope.DEPENDENT.is(injectionPoint.getResolvedBean().getScope())
- && (injectionPoint.getResolvedBean()
- .getAllInjectionPoints().stream()
- .anyMatch(ip -> BuiltinBean.INJECTION_POINT.hasRawTypeDotName(ip.getRequiredType().name()))
- || injectionPoint.getResolvedBean().isSynthetic())) {
- // Injection point resolves to a dependent bean that injects InjectionPoint metadata and so we need to wrap the injectable
- // reference provider
+ if (injectionPoint.isCurrentInjectionPointWrapperNeeded()) {
ResultHandle wrapHandle = wrapCurrentInjectionPoint(classOutput, beanCreator, bean, constructor,
injectionPoint, paramIdx++, tccl, reflectionRegistration);
ResultHandle wrapSupplierHandle = constructor.newInstance(
diff --git a/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/BeanInfo.java b/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/BeanInfo.java
index 93803ee8fff08..fcf2b7e5b754d 100644
--- a/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/BeanInfo.java
+++ b/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/BeanInfo.java
@@ -279,6 +279,15 @@ public List getAllInjectionPoints() {
return injectionPoints;
}
+ boolean requiresInjectionPointMetadata() {
+ for (InjectionPointInfo injectionPoint : getAllInjectionPoints()) {
+ if (DotNames.INJECTION_POINT.equals(injectionPoint.getRequiredType().name())) {
+ return true;
+ }
+ }
+ return false;
+ }
+
Optional getConstructorInjection() {
return injections.isEmpty() ? Optional.empty() : injections.stream().filter(Injection::isConstructor).findAny();
}
diff --git a/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/InjectionPointInfo.java b/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/InjectionPointInfo.java
index c02cb407a7026..67997481ce130 100644
--- a/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/InjectionPointInfo.java
+++ b/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/InjectionPointInfo.java
@@ -304,6 +304,20 @@ public boolean isSynthetic() {
return target == null;
}
+ /**
+ * If an injection point resolves to a dependent bean that (A) injects the InjectionPoint metadata or (2) is synthetic, then
+ * we need to wrap the injectable reference provider.
+ *
+ * @return {@code true} if a wrapper is needed, {@code false} otherwise
+ */
+ boolean isCurrentInjectionPointWrapperNeeded() {
+ BeanInfo bean = getResolvedBean();
+ if (bean != null && BuiltinScope.DEPENDENT.is(bean.getScope())) {
+ return bean.isSynthetic() || bean.requiresInjectionPointMetadata();
+ }
+ return false;
+ }
+
@Override
public String toString() {
return "InjectionPointInfo [requiredType=" + typeAndQualifiers.type + ", requiredQualifiers="
diff --git a/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/ObserverGenerator.java b/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/ObserverGenerator.java
index 1564231fffe47..45407549f2781 100644
--- a/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/ObserverGenerator.java
+++ b/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/ObserverGenerator.java
@@ -551,10 +551,7 @@ protected void createConstructor(ClassOutput classOutput, ClassCreator observerC
injectionPointToProviderField.get(injectionPoint),
annotationLiterals, observer, reflectionRegistration, injectionPointAnnotationsPredicate));
} else {
- if (injectionPoint.getResolvedBean().getAllInjectionPoints().stream()
- .anyMatch(ip -> BuiltinBean.INJECTION_POINT.hasRawTypeDotName(ip.getRequiredType().name()))) {
- // IMPL NOTE: Injection point resolves to a dependent bean that injects InjectionPoint metadata and so we need to wrap the injectable
- // reference provider
+ if (injectionPoint.isCurrentInjectionPointWrapperNeeded()) {
ResultHandle requiredQualifiersHandle = BeanGenerator.collectInjectionPointQualifiers(classOutput,
observerCreator,
observer.getDeclaringBean().getDeployment(), constructor,
diff --git a/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/Types.java b/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/Types.java
index 4002918a6815a..3b676aa46745e 100644
--- a/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/Types.java
+++ b/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/Types.java
@@ -507,7 +507,7 @@ static void checkArrayType(ArrayType arrayType, AnnotationTarget producerFieldOr
/**
* Detects wildcard for given type.
- * In case this is related to a producer field or method, it either logs or throws a {@link DefinitionException}
+ * In case the annotation target is a producer and the boolean parameter is true, throws a {@link DefinitionException}
* based on the boolean parameter.
* Returns true if a wildcard is detected, false otherwise.
*/
@@ -525,16 +525,9 @@ static boolean containsWildcard(Type type, AnnotationTarget producerFieldOrMetho
+
" contains a parameterized type with a wildcard. This type is not a legal bean type" +
" according to CDI specification.");
- } else if (producerFieldOrMethod != null) {
- // a producer method with wildcard in the type hierarchy of the return type
- LOGGER.info("Producer " +
- (producerFieldOrMethod.kind().equals(AnnotationTarget.Kind.FIELD) ? "field " : "method ") +
- producerFieldOrMethod +
- " contains a parameterized typed with a wildcard. This type is not a legal bean type" +
- " according to CDI specification and will be ignored during bean resolution.");
- return true;
} else {
- // wildcard detection for class-based beans, these still need to be skipped as they aren't valid bean types
+ // a producer method with wildcard in the type hierarchy of the return type
+ // OR wildcard detection for class-based beans, these still need to be skipped as they aren't valid bean types
return true;
}
} else if (type.kind().equals(Kind.PARAMETERIZED_TYPE)) {
diff --git a/independent-projects/bootstrap/pom.xml b/independent-projects/bootstrap/pom.xml
index 730366f50975a..6f1ef3fff22fe 100644
--- a/independent-projects/bootstrap/pom.xml
+++ b/independent-projects/bootstrap/pom.xml
@@ -4,16 +4,15 @@
child.project.url.inherit.append.path="false">
4.0.0
- org.jboss
- jboss-parent
- 39
+ io.quarkus
+ quarkus-parent
+ 999-SNAPSHOT
+ ../parent/pom.xml
- io.quarkus
quarkus-bootstrap-parent
Quarkus - Bootstrap - Parent
https://github.com/quarkusio/quarkus
pom
- 999-SNAPSHOT
Apache License, Version 2.0
@@ -71,7 +70,7 @@
1.0.11
1.1.0.Final
1.7.36
- 22.3.0
+ 22.3.2
2.6.0
1.7
3.5.1
diff --git a/independent-projects/enforcer-rules/pom.xml b/independent-projects/enforcer-rules/pom.xml
index 8a47259e60290..a9082af2a07f7 100644
--- a/independent-projects/enforcer-rules/pom.xml
+++ b/independent-projects/enforcer-rules/pom.xml
@@ -5,11 +5,11 @@
child.project.url.inherit.append.path="false">
4.0.0
- org.jboss
- jboss-parent
- 39
+ io.quarkus
+ quarkus-parent
+ 999-SNAPSHOT
+ ../parent/pom.xml
- io.quarkus
quarkus-enforcer-rules
Quarkus - Enforcer Rules
https://github.com/quarkusio/quarkus
diff --git a/independent-projects/extension-maven-plugin/pom.xml b/independent-projects/extension-maven-plugin/pom.xml
index fb63ce98d42e7..c9be0f5ffb148 100644
--- a/independent-projects/extension-maven-plugin/pom.xml
+++ b/independent-projects/extension-maven-plugin/pom.xml
@@ -3,11 +3,11 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
- org.jboss
- jboss-parent
- 39
+ io.quarkus
+ quarkus-parent
+ 999-SNAPSHOT
+ ../parent/pom.xml
- io.quarkus
quarkus-extension-maven-plugin
999-SNAPSHOT
Quarkus - Extension Maven plugin
diff --git a/independent-projects/ide-config/pom.xml b/independent-projects/ide-config/pom.xml
index 4e061069173af..c5a6117d220f6 100644
--- a/independent-projects/ide-config/pom.xml
+++ b/independent-projects/ide-config/pom.xml
@@ -4,13 +4,13 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
child.project.url.inherit.append.path="false">
- org.jboss
- jboss-parent
- 39
+ io.quarkus
+ quarkus-parent
+ 999-SNAPSHOT
+ ../parent/pom.xml
4.0.0
- io.quarkus
quarkus-ide-config
Quarkus - IDE/Tools - Config
https://github.com/quarkusio/quarkus
diff --git a/independent-projects/parent/pom.xml b/independent-projects/parent/pom.xml
new file mode 100644
index 0000000000000..5b7d957eba1a7
--- /dev/null
+++ b/independent-projects/parent/pom.xml
@@ -0,0 +1,434 @@
+
+
+ 4.0.0
+ io.quarkus
+ quarkus-parent
+ 999-SNAPSHOT
+
+ Quarkus - Parent POM
+ Quarkus Parent POM
+ https://quarkus.io
+
+ 2020
+
+ pom
+
+
+
+ 3.3.0
+ 3.0.0
+ 3.2.0
+ 3.11.0
+ 3.1.1
+ 3.3.0
+ 3.1.0
+ 3.1.0
+ 2.22.0
+ 3.0.1
+ 1.8.0
+ 3.1.1
+ 3.5.0
+ 3.3.0
+ 1.6.13
+ 3.0.0
+ 3.3.1
+ 3.4.1
+ 3.2.1
+ ${version.failsafe.plugin}
+ 1.1.3
+
+
+ false
+
+
+ true
+ 11
+ ${maven.compiler.release}
+ ${maven.compiler.release}
+ ${maven.compiler.target}
+ ${maven.compiler.source}
+ false
+
+
+ UTF-8
+ UTF-8
+
+
+ ${maven.compiler.target}
+ ${maven.compiler.source}
+ ${maven.compiler.testTarget}
+ ${maven.compiler.testSource}
+
+
+ 3.8.6
+ ${maven.compiler.argument.source}
+ ERROR
+
+
+ false
+
+
+
+
+ Apache License, Version 2.0
+ https://www.apache.org/licenses/LICENSE-2.0.txt
+ repo
+
+
+
+
+ GitHub
+ https://github.com/quarkusio/quarkus/issues
+
+
+
+
+ quarkus
+ Quarkus Community
+
+
+
+
+ scm:git:git@github.com:quarkusio/quarkus.git
+ scm:git:git@github.com:quarkusio/quarkus.git
+ https://github.com/quarkusio/quarkus
+ HEAD
+
+
+
+
+ ossrh
+ https://s01.oss.sonatype.org/content/repositories/snapshots/
+
+
+ oss.sonatype
+ https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-enforcer-plugin
+
+
+ enforce-java-version
+
+ enforce
+
+
+
+
+ To build this project, don't use maven repositories over HTTP. Please use
+ HTTPS in your settings.xml or run the build with property
+ insecure.repositories=WARN
+
+ ${insecure.repositories}
+
+ http://*
+
+
+ http://*
+
+
+
+ To build this project JDK ${jdk.min.version} (or greater) is required.
+ Please install it.
+
+ ${jdk.min.version}
+
+
+
+
+
+ enforce-maven-version
+
+ enforce
+
+
+
+
+ To build this project Maven ${maven.min.version} (or greater) is required.
+ Please install it.
+
+ ${maven.min.version}
+
+
+
+
+
+
+
+
+
+ org.codehaus.mojo
+ buildnumber-maven-plugin
+
+
+ get-scm-revision
+ initialize
+
+ create
+
+
+ false
+ false
+ UNKNOWN
+ true
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+ true
+ true
+
+ ${maven.compiler.argument.target}
+ ${maven.compiler.argument.testSource}
+ ${maven.compiler.argument.testTarget}
+ true
+
+ -Xlint:unchecked
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+
+
+ attach-sources
+
+ jar-no-fork
+
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ ${version.compiler.plugin}
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ ${version.gpg.plugin}
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+ ${version.buildhelper.plugin}
+
+
+ org.codehaus.mojo
+ buildnumber-maven-plugin
+ ${version.buildnumber.plugin}
+
+
+ org.apache.maven.plugins
+ maven-clean-plugin
+ ${version.clean.plugin}
+
+
+ org.apache.maven.plugins
+ maven-enforcer-plugin
+ ${version.enforcer.plugin}
+
+
+ org.apache.maven.plugins
+ maven-install-plugin
+ ${version.install.plugin}
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ ${version.javadoc.plugin}
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+ ${version.jar.plugin}
+
+
+ org.apache.maven.plugins
+ maven-deploy-plugin
+ ${version.deploy.plugin}
+
+
+ org.apache.maven.plugins
+ maven-shade-plugin
+ ${version.shade.plugin}
+
+
+ org.apache.maven.plugins
+ maven-release-plugin
+ ${version.release.plugin}
+
+ clean install
+ true
+ @{project.version}
+ false
+ true
+ false
+
+
+
+ org.apache.maven.plugins
+ maven-resources-plugin
+ ${version.resources.plugin}
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ ${version.source.plugin}
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+
+ ${project.url}
+ ${java.version}
+ ${java.vendor}
+ ${os.name}
+ ${os.arch}
+ ${os.version}
+ ${project.scm.url}
+ ${project.scm.connection}
+ ${buildNumber}
+
+
+
+
+
+ net.revelc.code.formatter
+ formatter-maven-plugin
+ ${version.formatter.plugin}
+
+ LF
+ ${format.skip}
+
+
+
+ net.revelc.code
+ impsort-maven-plugin
+ ${version.impsort.plugin}
+
+ java.,javax.,jakarta.,org.,com.
+ *
+ ${format.skip}
+ true
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ ${version.surefire.plugin}
+
+
+ org.jboss.logmanager.LogManager
+ ${maven.home}
+ ${settings.localRepository}
+ ${session.request.userSettingsFile.path}
+ ${project.build.directory}
+
+
+
+
+ org.apache.maven.plugins
+ maven-failsafe-plugin
+ ${version.failsafe.plugin}
+
+
+ org.jboss.logmanager.LogManager
+ ${maven.home}
+ ${settings.localRepository}
+ ${session.request.userSettingsFile.path}
+
+
+
+
+ it.ozimov
+ yaml-properties-maven-plugin
+ ${version.yaml-properties.plugin}
+
+
+ org.sonatype.plugins
+ nexus-staging-maven-plugin
+ ${version.nexus-staging.plugin}
+
+
+ org.codehaus.mojo
+ exec-maven-plugin
+ ${version.exec.plugin}
+
+
+
+
+
+
+ release
+
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+
+
+ package
+
+ jar
+
+
+
+
+
+ org.sonatype.plugins
+ nexus-staging-maven-plugin
+ true
+
+ https://s01.oss.sonatype.org/
+ ossrh
+ 60
+
+
+
+
+
+
+
diff --git a/independent-projects/qute/pom.xml b/independent-projects/qute/pom.xml
index 0d28e7ff5f35d..048276809e653 100644
--- a/independent-projects/qute/pom.xml
+++ b/independent-projects/qute/pom.xml
@@ -6,9 +6,10 @@
child.project.url.inherit.append.path="false">
4.0.0
- org.jboss
- jboss-parent
- 39
+ io.quarkus
+ quarkus-parent
+ 999-SNAPSHOT
+ ../parent/pom.xml
io.quarkus.qute
qute-parent
diff --git a/independent-projects/resteasy-reactive/pom.xml b/independent-projects/resteasy-reactive/pom.xml
index 4d8c4138af963..061fa8f88bf4f 100644
--- a/independent-projects/resteasy-reactive/pom.xml
+++ b/independent-projects/resteasy-reactive/pom.xml
@@ -6,9 +6,10 @@
4.0.0
- org.jboss
- jboss-parent
- 39
+ io.quarkus
+ quarkus-parent
+ 999-SNAPSHOT
+ ../parent/pom.xml
io.quarkus.resteasy.reactive
resteasy-reactive-parent
diff --git a/independent-projects/resteasy-reactive/server/runtime/src/main/java/org/jboss/resteasy/reactive/server/jaxrs/HttpHeadersImpl.java b/independent-projects/resteasy-reactive/server/runtime/src/main/java/org/jboss/resteasy/reactive/server/jaxrs/HttpHeadersImpl.java
index b6cb4e3500d44..35185cb1ed0d8 100644
--- a/independent-projects/resteasy-reactive/server/runtime/src/main/java/org/jboss/resteasy/reactive/server/jaxrs/HttpHeadersImpl.java
+++ b/independent-projects/resteasy-reactive/server/runtime/src/main/java/org/jboss/resteasy/reactive/server/jaxrs/HttpHeadersImpl.java
@@ -23,7 +23,6 @@ public class HttpHeadersImpl implements HttpHeaders {
private final MultivaluedMap requestHeaders;
private final MultivaluedMap unmodifiableRequestHeaders;
- private Map cookies;
public HttpHeadersImpl(Iterable> vertxHeaders) {
requestHeaders = new CaseInsensitiveMap<>();
@@ -50,10 +49,7 @@ public List getRequestHeader(String name) {
@Override
public Map getCookies() {
- if (cookies == null) {
- cookies = Collections.unmodifiableMap(HeaderUtil.getCookies(requestHeaders));
- }
- return cookies;
+ return Collections.unmodifiableMap(HeaderUtil.getCookies(requestHeaders));
}
@Override
diff --git a/independent-projects/resteasy-reactive/server/runtime/src/main/java/org/jboss/resteasy/reactive/server/jaxrs/ResponseBuilderImpl.java b/independent-projects/resteasy-reactive/server/runtime/src/main/java/org/jboss/resteasy/reactive/server/jaxrs/ResponseBuilderImpl.java
index c4c2847152c43..208c1093d4fd8 100644
--- a/independent-projects/resteasy-reactive/server/runtime/src/main/java/org/jboss/resteasy/reactive/server/jaxrs/ResponseBuilderImpl.java
+++ b/independent-projects/resteasy-reactive/server/runtime/src/main/java/org/jboss/resteasy/reactive/server/jaxrs/ResponseBuilderImpl.java
@@ -40,10 +40,12 @@ public Response.ResponseBuilder location(URI location) {
prefix = deployment.getPrefix();
}
// Spec says relative to request, but TCK tests relative to Base URI, so we do that
- location = new URI(req.getRequestScheme(), null, host, port,
- prefix +
- (location.getPath().startsWith("/") ? location.getPath() : "/" + location.getPath()),
- location.getQuery(), null);
+ String path = location.toString();
+ if (!path.startsWith("/")) {
+ path = "/" + path;
+ }
+ URI baseUri = new URI(req.getRequestScheme(), null, host, port, null, null, null);
+ location = baseUri.resolve(prefix + path);
} catch (URISyntaxException e) {
throw new RuntimeException(e);
}
@@ -72,9 +74,12 @@ public Response.ResponseBuilder contentLocation(URI location) {
port = Integer.parseInt(host.substring(index + 1));
host = host.substring(0, index);
}
- location = new URI(req.getRequestScheme(), null, host, port,
- location.getPath().startsWith("/") ? location.getPath() : "/" + location.getPath(),
- location.getQuery(), null);
+ String path = location.toString();
+ if (!path.startsWith("/")) {
+ path = "/" + path;
+ }
+ location = new URI(req.getRequestScheme(), null, host, port, null, null, null)
+ .resolve(path);
} catch (URISyntaxException e) {
throw new RuntimeException(e);
}
diff --git a/independent-projects/resteasy-reactive/server/runtime/src/main/java/org/jboss/resteasy/reactive/server/jaxrs/RestResponseBuilderImpl.java b/independent-projects/resteasy-reactive/server/runtime/src/main/java/org/jboss/resteasy/reactive/server/jaxrs/RestResponseBuilderImpl.java
index 21d74d4b9f828..a62003cbef6a5 100644
--- a/independent-projects/resteasy-reactive/server/runtime/src/main/java/org/jboss/resteasy/reactive/server/jaxrs/RestResponseBuilderImpl.java
+++ b/independent-projects/resteasy-reactive/server/runtime/src/main/java/org/jboss/resteasy/reactive/server/jaxrs/RestResponseBuilderImpl.java
@@ -40,10 +40,12 @@ public RestResponse.ResponseBuilder location(URI location) {
prefix = deployment.getPrefix();
}
// Spec says relative to request, but TCK tests relative to Base URI, so we do that
- location = new URI(req.getRequestScheme(), null, host, port,
- prefix +
- (location.getPath().startsWith("/") ? location.getPath() : "/" + location.getPath()),
- location.getQuery(), null);
+ String path = location.toString();
+ if (!path.startsWith("/")) {
+ path = "/" + path;
+ }
+ URI baseUri = new URI(req.getRequestScheme(), null, host, port, null, null, null);
+ location = baseUri.resolve(prefix + path);
} catch (URISyntaxException e) {
throw new RuntimeException(e);
}
@@ -72,9 +74,12 @@ public RestResponse.ResponseBuilder contentLocation(URI location) {
port = Integer.parseInt(host.substring(index + 1));
host = host.substring(0, index);
}
- location = new URI(req.getRequestScheme(), null, host, port,
- location.getPath().startsWith("/") ? location.getPath() : "/" + location.getPath(),
- location.getQuery(), null);
+ String path = location.toString();
+ if (!path.startsWith("/")) {
+ path = "/" + path;
+ }
+ location = new URI(req.getRequestScheme(), null, host, port, null, null, null)
+ .resolve(path);
} catch (URISyntaxException e) {
throw new RuntimeException(e);
}
diff --git a/independent-projects/resteasy-reactive/server/vertx/src/test/java/org/jboss/resteasy/reactive/server/vertx/test/CookiesSetInFilterTest.java b/independent-projects/resteasy-reactive/server/vertx/src/test/java/org/jboss/resteasy/reactive/server/vertx/test/CookiesSetInFilterTest.java
new file mode 100644
index 0000000000000..5c367f1998859
--- /dev/null
+++ b/independent-projects/resteasy-reactive/server/vertx/src/test/java/org/jboss/resteasy/reactive/server/vertx/test/CookiesSetInFilterTest.java
@@ -0,0 +1,66 @@
+package org.jboss.resteasy.reactive.server.vertx.test;
+
+import static io.restassured.RestAssured.given;
+import static io.restassured.RestAssured.when;
+import static org.hamcrest.Matchers.is;
+
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.container.ContainerRequestContext;
+import jakarta.ws.rs.core.HttpHeaders;
+import jakarta.ws.rs.core.NewCookie;
+
+import org.jboss.resteasy.reactive.RestCookie;
+import org.jboss.resteasy.reactive.common.headers.NewCookieHeaderDelegate;
+import org.jboss.resteasy.reactive.server.ServerRequestFilter;
+import org.jboss.resteasy.reactive.server.vertx.test.framework.ResteasyReactiveUnitTest;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+
+public class CookiesSetInFilterTest {
+
+ @RegisterExtension
+ static ResteasyReactiveUnitTest test = new ResteasyReactiveUnitTest()
+ .setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class)
+ .addClasses(TestResource.class, Filters.class));
+
+ @Test
+ void requestDoesNotContainCookie() {
+ when().get("/test")
+ .then()
+ .statusCode(200)
+ .body(is("foo"));
+ }
+
+ @Test
+ void requestContainsCookie() {
+ given()
+ .cookie("dummy", "bar")
+ .when().get("/test")
+ .then()
+ .statusCode(200)
+ .body(is("bar"));
+ }
+
+ @Path("test")
+ public static class TestResource {
+
+ @GET
+ public String get(@RestCookie String dummy) {
+ return dummy;
+ }
+ }
+
+ public static class Filters {
+
+ @ServerRequestFilter
+ public void setCookieIfMissing(ContainerRequestContext context) {
+ if (!context.getCookies().containsKey("dummy")) {
+ context.getHeaders().add(HttpHeaders.COOKIE,
+ NewCookieHeaderDelegate.INSTANCE.toString(new NewCookie.Builder("dummy").value("foo").build()));
+ }
+ }
+ }
+}
diff --git a/independent-projects/resteasy-reactive/server/vertx/src/test/java/org/jboss/resteasy/reactive/server/vertx/test/response/ResponseTest.java b/independent-projects/resteasy-reactive/server/vertx/src/test/java/org/jboss/resteasy/reactive/server/vertx/test/response/ResponseTest.java
index 40af3653860a6..849646f9eb373 100644
--- a/independent-projects/resteasy-reactive/server/vertx/src/test/java/org/jboss/resteasy/reactive/server/vertx/test/response/ResponseTest.java
+++ b/independent-projects/resteasy-reactive/server/vertx/src/test/java/org/jboss/resteasy/reactive/server/vertx/test/response/ResponseTest.java
@@ -2,6 +2,7 @@
import jakarta.ws.rs.core.HttpHeaders;
import jakarta.ws.rs.core.Response;
+import jakarta.ws.rs.core.UriBuilder;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
@@ -16,4 +17,20 @@ public void testCaseInsensitivity() {
Assertions.assertEquals("HEAD", response.getHeaders().getFirst("allow"));
Assertions.assertEquals("HEAD", response.getHeaders().getFirst(HttpHeaders.ALLOW));
}
+
+ @Test
+ public void testLocation() {
+ final var location = UriBuilder.fromUri("http://localhost:8080").path("{language}")
+ .build("en/us");
+ Response response = Response.ok("Hello").location(location).build();
+ Assertions.assertEquals("http://localhost:8080/en%2Fus", response.getLocation().toString());
+ }
+
+ @Test
+ public void testContentLocation() {
+ final var location = UriBuilder.fromUri("http://localhost:8080").path("{language}")
+ .build("en/us");
+ Response response = Response.ok("Hello").contentLocation(location).build();
+ Assertions.assertEquals("http://localhost:8080/en%2Fus", response.getHeaderString("Content-Location"));
+ }
}
diff --git a/independent-projects/resteasy-reactive/server/vertx/src/test/java/org/jboss/resteasy/reactive/server/vertx/test/response/RestResponseResource.java b/independent-projects/resteasy-reactive/server/vertx/src/test/java/org/jboss/resteasy/reactive/server/vertx/test/response/RestResponseResource.java
index 1c2f8f1e5a8b0..d72fdf301ac5e 100644
--- a/independent-projects/resteasy-reactive/server/vertx/src/test/java/org/jboss/resteasy/reactive/server/vertx/test/response/RestResponseResource.java
+++ b/independent-projects/resteasy-reactive/server/vertx/src/test/java/org/jboss/resteasy/reactive/server/vertx/test/response/RestResponseResource.java
@@ -13,6 +13,7 @@
import jakarta.ws.rs.core.CacheControl;
import jakarta.ws.rs.core.NewCookie;
import jakarta.ws.rs.core.Response;
+import jakarta.ws.rs.core.UriBuilder;
import jakarta.ws.rs.core.Variant;
import org.jboss.resteasy.reactive.RestResponse;
@@ -47,6 +48,24 @@ public RestResponse> wildcard() {
return RestResponse.ResponseBuilder.ok("Hello").header("content-type", "text/plain").build();
}
+ @GET
+ @Path("rest-response-location")
+ public RestResponse> location() {
+ final var location = UriBuilder.fromResource(RestResponseResource.class).path("{language}")
+ .queryParam("user", "John")
+ .build("en/us");
+ return RestResponse.ResponseBuilder.ok("Hello").location(location).build();
+ }
+
+ @GET
+ @Path("rest-response-content-location")
+ public RestResponse> contentLocation() {
+ final var location = UriBuilder.fromResource(RestResponseResource.class).path("{language}")
+ .queryParam("user", "John")
+ .build("en/us");
+ return RestResponse.ResponseBuilder.ok("Hello").contentLocation(location).build();
+ }
+
@GET
@Path("rest-response-full")
@SuppressWarnings("deprecation")
diff --git a/independent-projects/resteasy-reactive/server/vertx/src/test/java/org/jboss/resteasy/reactive/server/vertx/test/response/RestResponseTest.java b/independent-projects/resteasy-reactive/server/vertx/src/test/java/org/jboss/resteasy/reactive/server/vertx/test/response/RestResponseTest.java
index 03d83f208b2c9..2563091c4f076 100644
--- a/independent-projects/resteasy-reactive/server/vertx/src/test/java/org/jboss/resteasy/reactive/server/vertx/test/response/RestResponseTest.java
+++ b/independent-projects/resteasy-reactive/server/vertx/src/test/java/org/jboss/resteasy/reactive/server/vertx/test/response/RestResponseTest.java
@@ -1,5 +1,7 @@
package org.jboss.resteasy.reactive.server.vertx.test.response;
+import static org.hamcrest.CoreMatchers.endsWith;
+
import java.util.function.Supplier;
import org.hamcrest.Matchers;
@@ -107,5 +109,11 @@ public void test() {
.then().statusCode(200)
.and().body(Matchers.equalTo("Uni request filter"))
.and().contentType("text/plain");
+ RestAssured.get("/rest-response-location")
+ .then().statusCode(200)
+ .header("Location", endsWith("/en%2Fus?user=John"));
+ RestAssured.get("/rest-response-content-location")
+ .then().statusCode(200)
+ .header("Content-Location", endsWith("/en%2Fus?user=John"));
}
}
diff --git a/independent-projects/revapi/pom.xml b/independent-projects/revapi/pom.xml
index 8d37ec70c0168..763f581599ac8 100644
--- a/independent-projects/revapi/pom.xml
+++ b/independent-projects/revapi/pom.xml
@@ -3,16 +3,16 @@
child.project.url.inherit.append.path="false">
4.0.0
- org.jboss
- jboss-parent
- 39
+ io.quarkus
+ quarkus-parent
+ 999-SNAPSHOT
+ ../parent/pom.xml
- io.quarkus
quarkus-revapi-config
Quarkus - Revapi Configuration
- 999-SNAPSHOT
- Contains the configuration of the Revapi API checker and the list of the API changes
+ 999-SNAPSHOT
+ Contains the configuration of the Revapi API checker and the list of the API changes
in the Quarkus APIs.
https://github.com/quarkusio/quarkus
diff --git a/independent-projects/tools/pom.xml b/independent-projects/tools/pom.xml
index 0af8f7ff8bb34..2b02c489716d0 100644
--- a/independent-projects/tools/pom.xml
+++ b/independent-projects/tools/pom.xml
@@ -4,11 +4,11 @@
child.project.url.inherit.append.path="false">
4.0.0
- org.jboss
- jboss-parent
- 39
+ io.quarkus
+ quarkus-parent
+ 999-SNAPSHOT
+ ../parent/pom.xml
- io.quarkus
quarkus-tools-parent
Quarkus - Dev tools - Parent
https://github.com/quarkusio/quarkus
diff --git a/integration-tests/oidc-wiremock/src/main/java/io/quarkus/it/keycloak/AdminResource.java b/integration-tests/oidc-wiremock/src/main/java/io/quarkus/it/keycloak/AdminResource.java
index 298096b871fd5..078878f0b6417 100644
--- a/integration-tests/oidc-wiremock/src/main/java/io/quarkus/it/keycloak/AdminResource.java
+++ b/integration-tests/oidc-wiremock/src/main/java/io/quarkus/it/keycloak/AdminResource.java
@@ -26,6 +26,14 @@ public String admin() {
return "granted:" + identity.getRoles();
}
+ @Path("bearer-required-algorithm")
+ @GET
+ @RolesAllowed("admin")
+ @Produces(MediaType.APPLICATION_JSON)
+ public String adminRequiredAlgorithm() {
+ return "granted:" + identity.getRoles();
+ }
+
@Path("bearer-no-introspection")
@GET
@RolesAllowed("admin")
diff --git a/integration-tests/oidc-wiremock/src/main/java/io/quarkus/it/keycloak/CustomTenantResolver.java b/integration-tests/oidc-wiremock/src/main/java/io/quarkus/it/keycloak/CustomTenantResolver.java
index c6c0d806461dd..eb053dd60814b 100644
--- a/integration-tests/oidc-wiremock/src/main/java/io/quarkus/it/keycloak/CustomTenantResolver.java
+++ b/integration-tests/oidc-wiremock/src/main/java/io/quarkus/it/keycloak/CustomTenantResolver.java
@@ -44,6 +44,9 @@ public String resolve(RoutingContext context) {
if (path.endsWith("bearer")) {
return "bearer";
}
+ if (path.endsWith("bearer-required-algorithm")) {
+ return "bearer-required-algorithm";
+ }
if (path.endsWith("bearer-no-introspection")) {
return "bearer-no-introspection";
}
diff --git a/integration-tests/oidc-wiremock/src/main/resources/application.properties b/integration-tests/oidc-wiremock/src/main/resources/application.properties
index 827cbefb174d8..e05799cb38d5b 100644
--- a/integration-tests/oidc-wiremock/src/main/resources/application.properties
+++ b/integration-tests/oidc-wiremock/src/main/resources/application.properties
@@ -121,6 +121,11 @@ quarkus.oidc.bearer.credentials.secret=secret
quarkus.oidc.bearer.token.audience=https://service.example.com
quarkus.oidc.bearer.allow-token-introspection-cache=false
+quarkus.oidc.bearer-required-algorithm.auth-server-url=${keycloak.url}/realms/quarkus/
+quarkus.oidc.bearer-required-algorithm.client-id=quarkus-app
+quarkus.oidc.bearer-required-algorithm.credentials.secret=secret
+quarkus.oidc.bearer-required-algorithm.token.signature-algorithm=PS256
+
quarkus.oidc.bearer-role-claim-path.auth-server-url=${keycloak.url}/realms/quarkus/
quarkus.oidc.bearer-role-claim-path.client-id=quarkus-app
quarkus.oidc.bearer-role-claim-path.credentials.secret=secret
diff --git a/integration-tests/oidc-wiremock/src/test/java/io/quarkus/it/keycloak/BearerTokenAuthorizationTest.java b/integration-tests/oidc-wiremock/src/test/java/io/quarkus/it/keycloak/BearerTokenAuthorizationTest.java
index be3f542bda73e..7e9d08055cf0d 100644
--- a/integration-tests/oidc-wiremock/src/test/java/io/quarkus/it/keycloak/BearerTokenAuthorizationTest.java
+++ b/integration-tests/oidc-wiremock/src/test/java/io/quarkus/it/keycloak/BearerTokenAuthorizationTest.java
@@ -19,6 +19,7 @@
import io.quarkus.test.oidc.server.OidcWireMock;
import io.quarkus.test.oidc.server.OidcWiremockTestResource;
import io.restassured.RestAssured;
+import io.smallrye.jwt.algorithm.SignatureAlgorithm;
import io.smallrye.jwt.build.Jwt;
@QuarkusTest
@@ -48,6 +49,21 @@ public void testAccessAdminResource() {
.body(Matchers.containsString("admin"));
}
+ @Test
+ public void testAccessAdminResourceRequiredAlgorithm() {
+ // RS256 is rejected
+ RestAssured.given().auth().oauth2(getAccessToken("admin", Set.of("admin")))
+ .when().get("/api/admin/bearer-required-algorithm")
+ .then()
+ .statusCode(401);
+ // PS256 is OK
+ RestAssured.given().auth().oauth2(getAccessToken("admin", Set.of("admin"), SignatureAlgorithm.PS256))
+ .when().get("/api/admin/bearer-required-algorithm")
+ .then()
+ .statusCode(200)
+ .body(Matchers.containsString("admin"));
+ }
+
@Test
public void testAccessAdminResourceWithCertThumbprint() {
RestAssured.given().auth().oauth2(getAccessTokenWithThumbprint("admin", Set.of("admin")))
@@ -189,10 +205,15 @@ public void testInvalidBearerToken() {
}
private String getAccessToken(String userName, Set groups) {
+ return getAccessToken(userName, groups, SignatureAlgorithm.RS256);
+ }
+
+ private String getAccessToken(String userName, Set groups, SignatureAlgorithm alg) {
return Jwt.preferredUserName(userName)
.groups(groups)
.issuer("https://server.example.com")
.audience("https://service.example.com")
+ .jws().algorithm(alg)
.sign();
}
diff --git a/integration-tests/opentelemetry-vertx/pom.xml b/integration-tests/opentelemetry-vertx/pom.xml
index 47673ea3d47ea..762d2227ba8ec 100644
--- a/integration-tests/opentelemetry-vertx/pom.xml
+++ b/integration-tests/opentelemetry-vertx/pom.xml
@@ -22,10 +22,6 @@
io.quarkus
quarkus-vertx-http
-
- io.quarkus
- quarkus-agroal
-
io.quarkus
quarkus-micrometer
@@ -57,26 +53,9 @@
com.fasterxml.jackson.core
jackson-databind
-
-
- io.quarkus
- quarkus-jdbc-h2
- test
-
io.quarkus
- quarkus-test-h2
- test
-
-
- io.vertx
- vertx-sql-client
- test
-
-
- io.vertx
- vertx-jdbc-client
- test
+ quarkus-reactive-pg-client
@@ -108,20 +87,7 @@
io.quarkus
- quarkus-agroal-deployment
- ${project.version}
- pom
- test
-
-
- *
- *
-
-
-
-
- io.quarkus
- quarkus-jdbc-h2-deployment
+ quarkus-micrometer-deployment
${project.version}
pom
test
@@ -134,7 +100,7 @@
io.quarkus
- quarkus-micrometer-deployment
+ quarkus-reactive-pg-client-deployment
${project.version}
pom
test
@@ -149,6 +115,18 @@
+
+ maven-surefire-plugin
+
+ true
+
+
+
+ maven-failsafe-plugin
+
+ true
+
+
io.quarkus
quarkus-maven-plugin
@@ -164,6 +142,31 @@
+
+ test-postgresql
+
+
+ test-containers
+
+
+
+
+
+ maven-surefire-plugin
+
+ false
+
+
+
+ maven-failsafe-plugin
+
+ false
+
+
+
+
+
+
native-image
diff --git a/integration-tests/opentelemetry-vertx/src/test/java/io/quarkus/it/opentelemetry/vertx/SqlClientTest.java b/integration-tests/opentelemetry-vertx/src/test/java/io/quarkus/it/opentelemetry/vertx/SqlClientTest.java
index a9296ce2cbb5a..ce5b827923b5a 100644
--- a/integration-tests/opentelemetry-vertx/src/test/java/io/quarkus/it/opentelemetry/vertx/SqlClientTest.java
+++ b/integration-tests/opentelemetry-vertx/src/test/java/io/quarkus/it/opentelemetry/vertx/SqlClientTest.java
@@ -4,21 +4,18 @@
import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.DB_CONNECTION_STRING;
import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.DB_OPERATION;
import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.DB_STATEMENT;
-import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.DB_SYSTEM;
import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.DB_USER;
import static io.opentelemetry.semconv.trace.attributes.SemanticAttributes.HTTP_STATUS_CODE;
import static io.restassured.RestAssured.given;
import static java.net.HttpURLConnection.HTTP_OK;
import static org.awaitility.Awaitility.await;
import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.List;
import java.util.concurrent.TimeUnit;
-import javax.sql.DataSource;
-
import jakarta.inject.Inject;
import org.junit.jupiter.api.AfterEach;
@@ -27,57 +24,31 @@
import io.opentelemetry.sdk.testing.exporter.InMemorySpanExporter;
import io.opentelemetry.sdk.trace.data.SpanData;
-import io.quarkus.agroal.runtime.DataSourcesJdbcRuntimeConfig;
-import io.quarkus.datasource.runtime.DataSourcesBuildTimeConfig;
-import io.quarkus.datasource.runtime.DataSourcesRuntimeConfig;
-import io.quarkus.test.common.QuarkusTestResource;
-import io.quarkus.test.h2.H2DatabaseTestResource;
import io.quarkus.test.junit.QuarkusTest;
-import io.vertx.core.Vertx;
-import io.vertx.core.json.JsonObject;
-import io.vertx.ext.jdbc.spi.DataSourceProvider;
import io.vertx.ext.web.Router;
-import io.vertx.jdbcclient.JDBCPool;
+import io.vertx.mutiny.pgclient.PgPool;
-// H2 is not supported in native mode
@QuarkusTest
-@QuarkusTestResource(H2DatabaseTestResource.class)
public class SqlClientTest {
@Inject
Router router;
+
@Inject
- Vertx vertx;
- @Inject
- DataSource dataSource;
- @Inject
- DataSourcesBuildTimeConfig dataSourcesBuildTimeConfig;
- @Inject
- DataSourcesRuntimeConfig dataSourcesRuntimeConfig;
- @Inject
- DataSourcesJdbcRuntimeConfig dataSourcesJdbcRuntimeConfig;
+ PgPool pool;
@Inject
InMemorySpanExporter inMemorySpanExporter;
@Test
void sqlClient() {
- router.get("/sqlClient").handler(rc -> {
- JsonObject config = new JsonObject()
- .put("jdbcUrl", dataSourcesJdbcRuntimeConfig.jdbc.url.orElse(""))
- .put("username", dataSourcesRuntimeConfig.defaultDataSource.username.orElse(""))
- .put("database", dataSourcesBuildTimeConfig.defaultDataSource.dbKind.orElse(""));
+ pool.query("CREATE TABLE IF NOT EXISTS USERS (id INT, name VARCHAR(100));")
+ .execute().await().indefinitely();
- JDBCPool pool = JDBCPool.pool(vertx, DataSourceProvider.create(dataSource, config));
+ router.get("/sqlClient").handler(rc -> {
pool
.query("SELECT * FROM USERS")
.execute()
- .onSuccess(event -> {
- })
- .onFailure(event -> {
- })
- .compose(rows -> pool.close())
- // onComplete is executed before the end of Sql Telemetry data. This causes warnings in Scope.close
- .onComplete(event -> rc.response().end());
+ .subscribe().with(event -> rc.response().end());
});
@@ -86,25 +57,38 @@ void sqlClient() {
.then()
.statusCode(HTTP_OK);
- await().atMost(5, TimeUnit.SECONDS).until(() -> inMemorySpanExporter.getFinishedSpanItems().size() == 2);
+ // Why 3 spans:
+ // Table creation + HTTP + Query = 3
+
+ await().atMost(5, TimeUnit.SECONDS).until(() -> inMemorySpanExporter.getFinishedSpanItems().size() == 3);
List spans = inMemorySpanExporter.getFinishedSpanItems();
- assertEquals(2, spans.size());
-
- assertEquals(spans.get(0).getTraceId(), spans.get(1).getTraceId());
- assertEquals(spans.get(0).getSpanId(), spans.get(1).getParentSpanId());
-
- assertEquals("GET /sqlClient", spans.get(0).getName());
- assertEquals(HTTP_OK, spans.get(0).getAttributes().get(HTTP_STATUS_CODE));
-
- assertEquals("SELECT USERS", spans.get(1).getName());
- assertEquals(CLIENT, spans.get(1).getKind());
- assertEquals("h2", spans.get(1).getAttributes().get(DB_SYSTEM));
- assertEquals("SELECT", spans.get(1).getAttributes().get(DB_OPERATION));
- assertEquals("SELECT * FROM USERS", spans.get(1).getAttributes().get(DB_STATEMENT));
- assertEquals("quarkus", spans.get(1).getAttributes().get(DB_USER));
- assertNotNull(spans.get(1).getAttributes().get(DB_CONNECTION_STRING));
- //noinspection ConstantConditions
- assertTrue(spans.get(1).getAttributes().get(DB_CONNECTION_STRING).startsWith("jdbc:h2:tcp://localhost"));
+ assertEquals(3, spans.size());
+
+ // We cannot rely on the order, we must identify the spans.
+ SpanData tableCreation = inMemorySpanExporter.getFinishedSpanItems().stream()
+ .filter(sd -> sd.getName().contains("DB Query")).findFirst().orElseThrow();
+ SpanData httpSpan = inMemorySpanExporter.getFinishedSpanItems().stream()
+ .filter(sd -> sd.getName().contains("GET /sqlClient")).findFirst().orElseThrow();
+ SpanData querySpan = inMemorySpanExporter.getFinishedSpanItems().stream()
+ .filter(sd -> sd.getName().contains("SELECT USERS")).findFirst().orElseThrow();
+
+ assertNotEquals(httpSpan.getTraceId(), tableCreation.getTraceId()); // No relationship
+ assertEquals(httpSpan.getTraceId(), querySpan.getTraceId());
+ assertEquals(httpSpan.getSpanId(), querySpan.getParentSpanId());
+
+ assertEquals("GET /sqlClient", httpSpan.getName());
+ assertEquals(HTTP_OK, httpSpan.getAttributes().get(HTTP_STATUS_CODE));
+
+ assertEquals("SELECT USERS", querySpan.getName());
+ assertEquals(CLIENT, querySpan.getKind());
+ assertEquals("SELECT", querySpan.getAttributes().get(DB_OPERATION));
+ assertEquals("SELECT * FROM USERS", querySpan.getAttributes().get(DB_STATEMENT));
+ assertEquals("quarkus", querySpan.getAttributes().get(DB_USER));
+ assertNotNull(querySpan.getAttributes().get(DB_CONNECTION_STRING));
+
+ assertEquals("CREATE TABLE IF NOT EXISTS USERS (id INT, name VARCHAR(?));",
+ tableCreation.getAttributes().get(DB_STATEMENT));
+ assertEquals("quarkus", tableCreation.getAttributes().get(DB_USER));
}
@BeforeEach
diff --git a/pom.xml b/pom.xml
index 7de7c975e25d9..3498b1123303f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,15 +5,14 @@
child.project.url.inherit.append.path="false">
4.0.0
- org.jboss
- jboss-parent
- 39
+ io.quarkus
+ quarkus-parent
+ 999-SNAPSHOT
+ independent-projects/parent/pom.xml
- io.quarkus
- quarkus-parent
- Quarkus - Parent pom
- 999-SNAPSHOT
+ quarkus-project
+ Quarkus - Project pom
pom
Quarkus - Kubernetes Native Java stack tailored for OpenJDK HotSpot and GraalVM
@@ -86,6 +85,7 @@
+ independent-projects/parent
independent-projects/ide-config
independent-projects/revapi
independent-projects/arc
diff --git a/test-framework/common/src/main/java/io/quarkus/test/common/LauncherUtil.java b/test-framework/common/src/main/java/io/quarkus/test/common/LauncherUtil.java
index 70ba20715bb64..baea0de7847b6 100644
--- a/test-framework/common/src/main/java/io/quarkus/test/common/LauncherUtil.java
+++ b/test-framework/common/src/main/java/io/quarkus/test/common/LauncherUtil.java
@@ -3,6 +3,8 @@
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
+import java.io.InputStream;
+import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.time.Duration;
@@ -49,12 +51,15 @@ public static Config installAndGetSomeConfig() {
/**
* Launches a process using the supplied arguments and makes sure the process's output is drained to standard out
+ *
+ * Implementation detail: Avoid using ProcessBuilder's redirect here because it causes problems with Maven Failsafe
+ * as can be seen in here
*/
static Process launchProcess(List args) throws IOException {
- return new ProcessBuilder(args)
- .redirectErrorStream(true)
- .redirectOutput(ProcessBuilder.Redirect.INHERIT)
- .start();
+ Process process = Runtime.getRuntime().exec(args.toArray(new String[0]));
+ new Thread(new ProcessReader(process.getInputStream())).start();
+ new Thread(new ProcessReader(process.getErrorStream())).start();
+ return process;
}
/**
@@ -307,6 +312,31 @@ private void unableToDetermineData(String errorMessage) {
}
}
+ /**
+ * Used to drain the input of a launched process
+ */
+ private static class ProcessReader implements Runnable {
+
+ private final InputStream inputStream;
+
+ private ProcessReader(InputStream inputStream) {
+ this.inputStream = inputStream;
+ }
+
+ @Override
+ public void run() {
+ byte[] b = new byte[100];
+ int i;
+ try {
+ while ((i = inputStream.read(b)) > 0) {
+ System.out.print(new String(b, 0, i, StandardCharsets.UTF_8));
+ }
+ } catch (IOException e) {
+ //ignore
+ }
+ }
+ }
+
private static class SimpleContext implements IntegrationTestStartedNotifier.Context {
private final Path logFile;