Missing org.apache.http library package

I am writing unit tests for an application that hits other companies web servers using apache httpclient (v4.2.3). I would like to make fun of the web server functionality for reliable unit test results and found some links to org.apache.http.localserver.LocalTestServer as an efficient web server, a mocking tool that is convenient as it resides in the library from which I already addicted.

Unfortunately, grails cannot resolve the link to LocalTestServer, although it can very easily reference the HttpClient, and they seem to be in the same lib. Further research shows that some javadocs include the localserver package and some do not. What do I need to do to reference and use this package?

+4
source share
1 answer

In the blog link, if you look at a fragment of the Maven dependencies in the Base Installation , pay attention to <classifier>tests</classifier> . A classifier is used to distinguish between different cans built from the same POM. Unfortunately, based on this JIRA, I found that classifiers are not supported until Grails 2.3.

If you upload httpclient-4.2.3-tests.jar yourself to /lib , you should be fine, at least.

+7
source

All Articles