Import specific version of the library

Hi guys. I have a problem with HttpClient lib. Nuxeo DAM imports HttpClient v4.2.4 but i need v4.3.5. OSGI spec provides import package feature but for example nuxeo-automation-io or nuxeo-automation-server modules which uses HttpClient not specifies this section in theirs manifests.

So my question is how to import and setup specific version of the library that already in use by nuxeo platform without damaging nuxeo functional ?

Thanks.

0 votes

1 answers

2008 views

ANSWER

Have you tried just replacing the httpclient-4.2.4.jar JAR in nxserver/lib with the one you want? Aren't they binary compatible?
09/09/2014

Nope, but how can I be sure it will not break anything on the production environment ?
09/09/2014



Hi,

The perfect solution is to change the version in org.nuxeo:nuxeo-ecm, then run the platform tests and if everything is fine, send a pull-request of the version upgrade to Nuxeo.

A quick and dirty workaround is to embed the wanted version in your JARs making them use a different implementation than the rest of the platform.

On the packaging side, if you deploy your addon via a Marketplace Package, then the system will take care of upgrading the version of HttpClient in nxserver/lib while yours is greater than the Nuxeo one.

1 votes