hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Schneider (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HTTPASYNC-65) HttpAsyncClient does not work in OSGi
Date Wed, 15 Jan 2014 12:28:20 GMT

    [ https://issues.apache.org/jira/browse/HTTPASYNC-65?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13871992#comment-13871992
] 

Christian Schneider commented on HTTPASYNC-65:
----------------------------------------------

While the patch is really the minimal change I also checked if the config could be improved.
Currently every import is specified with a specific version. This makes the whole build very
fragile. So every change in a package has to be manually reflected. So while it now works
at runtime there probably will be more issues in the future.

I tried to use the defaults of the maven bundle plugin but they do not work because of the
separation between normal jar and bundle of httpclient. 

Another problem with the separation is that all users of httpclient and httpasync client will
have the same problems that I had. Their maven bundle plugin defaults also will not work.
So they will also have to define all imports by hand. 

So while I fully respect your decision to do the seperation and will help to fix errors in
the future I think you should reconsider this. In cxf we also had to make the decision between
separate modules for OSGi and e.g. blueprint or the problem with the optional imports. While
we are not fully happy with it we found that the optional imports were the lesser evil. I
think for the plain OSGi spec imports we even used non optional dependencies as the specs
are simple jars that do not hurt mutch.



> HttpAsyncClient does not work in OSGi
> -------------------------------------
>
>                 Key: HTTPASYNC-65
>                 URL: https://issues.apache.org/jira/browse/HTTPASYNC-65
>             Project: HttpComponents HttpAsyncClient
>          Issue Type: Bug
>    Affects Versions: 4.0 Final
>            Reporter: Christian Schneider
>             Fix For: 4.0.1
>
>         Attachments: HTTPASYNC-65-1.patch, HTTPASYNC-65-2.patch
>
>
> We are using the http async client for CXF. In the current trunk we reference the 4.0
version. 
> Unfortunately the bundle does not work for us. I spotted two problems:
> 1. The Bundle-SymbolicName is the same as the one in httpclient
> In the pom there is:
> <Bundle-SymbolicName>${project.groupId}.httpclient</Bundle-SymbolicName>
> See http://search.maven.org/remotecontent?filepath=org/apache/httpcomponents/httpasyncclient-osgi/4.0/httpasyncclient-osgi-4.0.pom
> 2. The bundle refers to commons logging api 1.1.3 but pax logging only provides 1.0.4.
I will also try to fix this for pax logging. 
> I think it should be possible to open up the import range for pax logging so you also
accept the 1.0.x version.
> I checked out the current trunk and was able to make it work by doing some changes in
the poms.
> I found that httpasyncclient has separate projects for the normal jar and the OSGi jar.
Is this really necessary? I was able to switch the normal jar to packaging bundle and configure
it there. This has the advantage that people only have to use one maven artifact for OSGi
and non OSGi usage. This is espacially intersting for frameworks like cxf that live in both
worlds.
> I will provide a patch with my changes. So you can review what I did.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message