I need to provide a java REST client, which should contain all required jars in one bundle. I chose RestEasy as REST framwork, since the server application is done on a JBoss.
Nearly all examples I found so far use either an application container environment, where those libs are provided and thus only the Java EE API is needed during compile or are build with Maven and thus dependencies are resolved automatically, which maybe be a good idea and the current standard way to do it, but for project-related reasons I need the jars in a lib folder and be able to include during the build and wihtin an executable jar.
So my question is, which jars a necessary to build a simple client which can do something like that:
ResteasyClient client = new ResteasyClientBuilder().build();
ResteasyWebTarget target = client.target(myURL).queryParam("param",
"value");
Builder builder = target.request(MediaType.APPLICATION_JSON).header("user", "abc");
Invocation invocation = builder.buildGet();
MyResponseObject response = invocation.invoke(MyResponseObject .class);
See Question&Answers more detail:os