I have a simple Rest application that is deployed to an IBM MobileFirst 7.1 Liberty Server. (I don't know the implementation of the JAX-RS but it is included with the liberty server runtime I believe)
I have to share some of my common code with other teams, so I moved some of the code into a separate maven project to be jared and added as a server library. This all works great until I had to add some @Provider annotated classes into the separate maven project. Specifically, some ExceptionMapper implementations marked with the @Provider annotation.
I have tried setting the class directly within the Application classes getClasses()
method. This seemed to work, but I get a warning message saying that my exception mapper implementations need to be marked with the @Provider or @Path annotations (which they are).
Is there some sort of trick to get JAX-RS to recognize these resource classes from a Jar file?