I wrote a Liferay 7 module that uses org.apache.http.client.methods.HttpPost.
So I downloaded the httpclient-osgi JAR and put it in deploy/
, but when I try to start it I get:
org.osgi.framework.BundleException: Could not resolve module: org.apache.httpcomponents.httpclient [1088]
Unresolved requirement: Import-Package: org.apache.http; version="[4.4.0,4.5.0)"
So I searched mvnrepository.com for org.apache.http
.
PROBLEM: No such component seems to exist.
Do I have no other option than including the classes inside my Liferay module?
Doing so sounds contrary to the OSGi principles: if my 100 Liferay modules use httpclient then including httpclient in each of them does not sound very modular.
Am I thinking the wrong way?
How to use a third-party component in a modular way in Liferay?