Skip to content

Commit

Permalink
Introduce a way to ignore mixing REST stacks errors
Browse files Browse the repository at this point in the history
  • Loading branch information
geoand committed Jan 16, 2024
1 parent 67e59aa commit dd81346
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
import io.quarkus.resteasy.reactive.spi.ContainerRequestFilterBuildItem;
import io.quarkus.resteasy.reactive.spi.ContainerResponseFilterBuildItem;
import io.quarkus.resteasy.reactive.spi.GeneratedJaxRsResourceBuildItem;
import io.quarkus.resteasy.reactive.spi.IgnoreStackMixingBuildItem;
import io.quarkus.resteasy.reactive.spi.MessageBodyReaderBuildItem;
import io.quarkus.resteasy.reactive.spi.MessageBodyReaderOverrideBuildItem;
import io.quarkus.resteasy.reactive.spi.MessageBodyWriterBuildItem;
Expand All @@ -93,7 +94,11 @@ public class ResteasyReactiveCommonProcessor {

@Produce(ServiceStartBuildItem.class)
@BuildStep
void checkMixingStacks(Capabilities capabilities, CurateOutcomeBuildItem curateOutcomeBuildItem) {
void checkMixingStacks(Capabilities capabilities, CurateOutcomeBuildItem curateOutcomeBuildItem,
List<IgnoreStackMixingBuildItem> ignoreStackMixingItems) {
if (!ignoreStackMixingItems.isEmpty()) {
return;
}
List<ResolvedDependency> resteasyClassicDeps = curateOutcomeBuildItem.getApplicationModel().getDependencies().stream()
.filter(d -> d.getGroupId().equals("org.jboss.resteasy")).collect(Collectors.toList());
boolean hasResteasyCoreDep = resteasyClassicDeps.stream()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package io.quarkus.resteasy.reactive.spi;

import io.quarkus.builder.item.MultiBuildItem;

/**
* Marker build item that can be used by advanced extensions that can make
* sure that mixing RESTEasy Classic and RESTEasy Reactive dependencies
* will not cause problems
*/
public final class IgnoreStackMixingBuildItem extends MultiBuildItem {
}

0 comments on commit dd81346

Please sign in to comment.