Quarkus extension deployment module that provides Jackson JSON serialization support for RESTEasy Classic REST services
npx @tessl/cli install tessl/maven-io-quarkus--quarkus-resteasy-jackson-deployment@3.26.0A Quarkus extension deployment module that enables Jackson JSON serialization support for RESTEasy Classic REST services. This module handles build-time configuration and setup for integrating Jackson JSON processing with RESTEasy Classic in Quarkus applications.
io.quarkus:quarkus-resteasy-jackson)import io.quarkus.resteasy.jackson.deployment.ResteasyJacksonProcessor;
import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.annotations.BuildProducer;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import io.quarkus.deployment.Feature;This deployment module is used internally by the Quarkus build system and typically not directly by application developers. When the RESTEasy Jackson extension is included in a Quarkus project, this deployment module automatically registers the necessary build-time configuration.
<!-- Add to pom.xml dependencies to enable Jackson support for RESTEasy Classic -->
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-jackson</artifactId>
</dependency>The deployment module then ensures proper integration:
// Example REST endpoint that benefits from this deployment module
@Path("/api")
@Produces(MediaType.APPLICATION_JSON)
public class ExampleResource {
@GET
public ExampleDto getData() {
return new ExampleDto("example", 42);
}
@POST
@Consumes(MediaType.APPLICATION_JSON)
public Response createData(ExampleDto data) {
// Jackson serialization/deserialization handled automatically
return Response.ok().build();
}
}This deployment module follows the standard Quarkus extension pattern:
RESTEASY_JACKSON feature in the Quarkus build systemThe core functionality provided by this deployment module is registering the RESTEasy Jackson feature during the Quarkus build process.
package io.quarkus.resteasy.jackson.deployment;
public class ResteasyJacksonProcessor {
@BuildStep
void feature(BuildProducer<FeatureBuildItem> feature) {
feature.produce(new FeatureBuildItem(Feature.RESTEASY_JACKSON));
}
}The main build processor class that handles feature registration.
public class ResteasyJacksonProcessor {
@BuildStep
void feature(BuildProducer<FeatureBuildItem> feature) {
feature.produce(new FeatureBuildItem(Feature.RESTEASY_JACKSON));
}
}The feature registration method that enables Jackson JSON serialization for RESTEasy Classic.
@BuildStep
void feature(BuildProducer<FeatureBuildItem> feature) {
feature.produce(new FeatureBuildItem(Feature.RESTEASY_JACKSON));
}@interface BuildStep {
// Quarkus build-time annotation
}
interface BuildProducer<T> {
void produce(T item);
}
class FeatureBuildItem {
FeatureBuildItem(Feature feature);
FeatureBuildItem(String name);
String getName();
}
enum Feature {
RESTEASY_JACKSON,
// ... other features
String getName();
}The extension is configured via quarkus-extension.yaml:
This deployment module depends on:
io.quarkus:quarkus-resteasy-deployment - RESTEasy deployment supportio.quarkus:quarkus-jackson-deployment - Jackson deployment supportio.quarkus:quarkus-resteasy-jackson - Runtime module for actual functionalityDuring the Quarkus build process, this module:
Feature.RESTEASY_JACKSON featureThis deployment module enables:
The module works transparently with JAX-RS annotations:
@Produces(MediaType.APPLICATION_JSON) for JSON responses@Consumes(MediaType.APPLICATION_JSON) for JSON request bodies@JsonProperty, @JsonIgnore, etc.