Impossible to ignore module javax.ws.rs.api <=> use other than bundled RestEasy?!
Hello,
We are using JBoss EAP 6.1.0, which is bundled with Rest Easy 2.3.6. We wanted to use the latest Rest Easy 3.0.6.Final for one of the webapps, without having to upgrade all the other webapps, i.e. without upgrading the resteasy modules. However, this seems to be impossible, is that correct?
The problem is that Rest Easy 3.0.6.Final requires a version of javax.ws.rs.core.Response with the method getHeaders, which is contained in jaxrs-api but is shadowed by Response from the javax.ws.rs.api module (jboss-jaxrs-api_1.1_spec-1.0.1.Final-redhat-2.jar). I added the module to exclusions in jboss-deployment-structure.xml but it had no effect. Is it correct that Java EE APIs cannot be excluded?
See a more detailed description of the problems at http://theholyjava.wordpress.com/2014/02/04/jboss-modules-suck-its-impossible-to-use-custom-resteasyjax-rs-under-jboss-7/
Summary: I'd like answers to two questions:
- Is it possible to use Rest Easy 3.0.6 for a webapp running at JBoss EAP 6.1 without upgrading or changing the modules, i.e. touching only the configuration of this app alone?
- Is it possible to exclude the javax.ws.rs.api module so that its classes do not pollute the classpath of my webapp?
Thank you!
Responses
I had a similar issue (trying to use CXF 3.0) and indeed exluding javaee.api does the trick with the caveat that I also had to add include all the modules that were included by javaee.api but the java.ws.rs.api.
(Note: I could not have added all of them but it was simpler that to try to find out which ones I really needed).
The other 'dirty' trick was simply to remove java.ws.rs.api from javaee.api assuming that not other apps needed it.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
