Skip to content

Commit

Permalink
Set the required property so it gets picked up by the TCK
Browse files Browse the repository at this point in the history
  • Loading branch information
rzo1 committed Nov 26, 2024
1 parent 8bfda17 commit 2ab902c
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/
package org.apache.tomee.tck.jaxrs;

import org.apache.openejb.loader.SystemInstance;
import org.jboss.arquillian.container.spi.event.container.BeforeDeploy;
import org.jboss.arquillian.core.api.annotation.Observes;
import org.jboss.arquillian.core.spi.LoadableExtension;
Expand All @@ -33,6 +34,8 @@ public void register(ExtensionBuilder builder) {
public void observeDeployment(@Observes BeforeDeploy bd) {
if (bd.getDeployment().getArchive() instanceof ClassContainer<?> classContainer) {
classContainer.addClass(NotFoundServlet.class);
// hack to ensure, that default providers are registered for the TCK (JAX-RS 3.1 mandates them ...)
SystemInstance.get().setProperty("openejb.jaxrs.skip.jakarta.json.providers.registration", "false");
}
}
}

0 comments on commit 2ab902c

Please sign in to comment.