Details
-
Bug
-
Resolution: Unresolved
-
Major
-
4.4.4.Final
-
None
-
?
Description
Put REST webresource in a war project - m2e adds JAX-RS support to the project.
Put REST webresource in a jar project, that is deployed in a war - m2e does not add JAX-RS support to the project.As JAX-RS 2.0 spec says in 2.3.2 Servlet:
"A JAX-RS application is packaged as a Web application in a .war file. The application classes are packaged in WEB-INF/classes or WEB-INF/lib and required libraries are packaged in WEB-INF/lib. See the Servlet specification for full details on packaging of web applications."That means you can have REST webresources in jars, that are deployed in a war. Such jars are web fragments in servlet terms.
The reproducer is attached.
The war project receives the relevant facets: Dynamic Web Module and JAX-RS.
The jar-ui project receives the Web Fragment Module facet, but no JAX-RS.
This is a quote from an analogous m2e-wtp issue. I'm not sure if there is anything to be done at JBT side of things, or if this is a strictly m2e-wtp issue. I see two relevant JBT specifics: jboss' repackaged jax-rs spec api and the JAX-RS/JAX-RS Support thingy in project properties.
I've attached a jboss-specific reproducer here, that uses jboss' repackaged jax-rs spec api.
It shows both JAX-RS Support not being enabled and JAX-RS facet not being added to a jar web fragment project.