Millies, Sebastian wrote:

-----Original Message-----
From: Simon Nash [mailto:[email protected]]
Sent: Wednesday, June 22, 2011 6:31 PM
To: [email protected]
Subject: Re: Tuscany 1.6 dependency on HttpClient 3.1

Millies, Sebastian wrote:
Hello there,



Tuscany 1.6 depends on Apache Commons HttpClient 3.1.



Is there any chance of upgrading this to Apache HttpComponents

HttpClient (currently 4.1.1)?



Is it really necessary to have the dependency in Tuscany at all?



Best,

Sebastian





Hi Sebastian,
This dependency is necessary because HttpClient is used by the Java
code
in a number of Tuscany modules:
  binding-atom-abdera
  binding-feed
  binding-gdata-runtime
  binding-jsonp-runtime
  binding-ws-axis2
To upgrade this dependency, the pom.xml files in these modules would
need
to be changed to use the newer version, and the newer version would
need
to be verified for compatibility by doing a complete top-level build.

The commons-httpclient dependency also appears in the following poms:
  modules/binding-rss-rome
  samples/simple-bigbank-spring
There's no use of httpclient in the Java code for these modules, so it
should be OK to remove the dependency from these poms.

The 3.1 level of commons-httpclient is used by Axis2 1.4.1.  It would
be necessary to add explicit exclusions for this in all the Tuscany
poms
that have an Axis2 1.4.1 dependency, and add the newer version to these
poms as an explicit dependency.  It would also be necessary to verify
that Axis2 1.4.1 works correctly with the newer version.  This could be
quite a lot of work.

The binary distribution build would need to be changed to exclude the
commons-httpclient-3.1 jar file (brought in as a dependency of Axis2)
and add the newer HttpClient jar instead.  Then the binary distribution
would need to be tested fully to make sure that it still works
correctly.

Finally the LICENSE file in the distribution module would need to be
updated.  I think that's everything, but I might have missed something.

Would you like to try doing this, and then create a JIRA with a patch
so
that someone can apply it?

   Simon

Thank you for the thorough analysis. I'm afraid that it sounds like more
work than I'm likely to have time for. Besides, I guess that Axis2 1.4.1 is quite unlikely to work with the newer version, since the API has substantially changed.
-- Sebastian



Yes, it would be quite a bit of work to do this if the APIs aren't fully
compatible.

Here's an alternative suggestion.  If you need to use the newer HttpClient API
in your application code, you should be able to do this by using the approach
described in [1].  This allows a Tuscany 1.x application to use Java classloader
isolation to avoid conflicts with the code used by the Tuscany 1.x runtime.

  Simon

[1] 
http://mail-archives.apache.org/mod_mbox/tuscany-user/201006.mbox/%[email protected]%3E

Reply via email to