Skip to content

Commit

Permalink
Move brotli4j dependency from netty to vertx-http
Browse files Browse the repository at this point in the history
Brotli4J is necessary only when using `vertx-http` (for now), no need to
bring it in for every app using `quarkus-netty`

See quarkusio#43556 for more details
  • Loading branch information
zakkak committed Sep 30, 2024
1 parent 10ff88f commit 26be68d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,11 @@ NativeImageConfigBuildItem build(
.addRuntimeInitializedClass("io.netty.handler.codec.http.websocketx.extensions.compression.DeflateDecoder")
.addRuntimeInitializedClass("io.netty.handler.codec.http.websocketx.WebSocket00FrameEncoder")
.addRuntimeInitializedClass("io.netty.handler.codec.compression.ZstdOptions")
.addRuntimeInitializedClass("io.netty.handler.codec.compression.ZstdConstants")
.addRuntimeInitializedClass("io.netty.handler.codec.compression.BrotliOptions");
.addRuntimeInitializedClass("io.netty.handler.codec.compression.ZstdConstants");
// Brotli is an optional dependency
if (QuarkusClassLoader.isClassPresentAtRuntime("io.netty.handler.codec.compression.BrotliOptions")) {
builder.addRuntimeInitializedClass("io.netty.handler.codec.compression.BrotliOptions");
}
} else {
log.debug("Not registering Netty HTTP classes as they were not found");
}
Expand Down
9 changes: 0 additions & 9 deletions extensions/netty/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,6 @@
<classifier>osx-x86_64</classifier>
<optional>true</optional>
</dependency>

<!--
The recent version of Netty have a hard dependency on brotli,
without this dependency, it's not possible to compile to native
-->
<dependency>
<groupId>com.aayushatharva.brotli4j</groupId>
<artifactId>brotli4j</artifactId>
</dependency>
</dependencies>

<build>
Expand Down
5 changes: 5 additions & 0 deletions extensions/vertx-http/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@
<groupId>io.github.crac</groupId>
<artifactId>org-crac</artifactId>
</dependency>
<!-- needed when quarkus.http.compressors contains "br" see https://github.com/quarkusio/quarkus/issues/43556 -->
<dependency>
<groupId>com.aayushatharva.brotli4j</groupId>
<artifactId>brotli4j</artifactId>
</dependency>
<!-- Test dependencies -->
<dependency>
<groupId>org.junit.jupiter</groupId>
Expand Down

0 comments on commit 26be68d

Please sign in to comment.