JAR does not have addAsLibraries() method because you usually don't want to add JARs into JAR. If you need to add jars, you have two options:
1/ Create a WAR instead and add JARs inside
2/ Create a fat JAR by merging content of multiple jars together
I tried your option #1 and it has gotten me much further; however, now I get an error:
javax.ejb.EJBException: org.jboss.resteasy.spi.LoggableFailure: Unable to find contextual data of type: javax.servlet.http.HttpServletRequest
Do you have any ideas why?
My EJB is annotated as a REST service (@Path) and I use:
private HttpServletRequest request;