Hi Jake,
I have tried that patch. It works fine for me. It resolves equally well
in eclipse target definition and osgi runtime. Though I would like to
note a few points:
1. org.apache.thrift.libthrift symbolic name for a bundle seems a bit
redundant. Is there a reson why it is not name org.apache.thrift ?
2. The bundle imports a lot of packages that might be absent in other
users' environments. Some users might not want to use Apache HTTP client
or servlets. I would suggest making them optional, if possible.
On 11.11.2011 7:08, Jake Farrell wrote:
I have attached a patch to Thrift-184 that will help anyone trying to use
thrift with osgi. There are a couple issues with the maven bundle plugin that I
ran into that I would like to address before committing this, but the jar that
is generated is fine and passes all current test we have. Please give it a try
and let me know if you see any problems
-Jake
On Nov 9, 2011, at 8:06 AM, Jeff Liu wrote:
Yes, you have to export other packages. Our
thrift.jar/META-INF/MANIFEST.MF: (thrift version: 0.6)
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.2
Created-By: 1.6.0_26-b03-384-10M3425 (Apple Inc.)
Implementation-Version: 0.6.1
Bundle-Name: Apache Thrift
Bundle-Description: Apache Thrift library
Bundle-SymbolicName: org.apache.thrift
Bundle-ManifestVersion: 2
Bundle-Version: 0.6.1
Export-Package: org.apache.thrift,
org.apache.thrift.async,
org.apache.thrift.meta_data,
org.apache.thrift.transport,
org.apache.thrift.protocol,
org.apache.thrift.server
Import-Package: org.slf4j
Best Regards,
Jeff
On Wed, Nov 9, 2011 at 9:37 PM, Ivan Larionov<[email protected]> wrote:
Dear All,
I would be really grateful if someone could comment on the following.
There is
THRIFT-184<https://issues.apache.org/**jira/browse/THRIFT-184<https://issues.apache.org/jira/browse/THRIFT-184>>
in JIRA which presents Thrift as an OSGi bundle. One<
https://issues.apache.org/**jira/browse/THRIFT-184?**
focusedCommentId=13146043&**page=com.atlassian.jira.**
plugin.system.issuetabpanels:**comment-tabpanel#comment-**13146043<https://issues.apache.org/jira/browse/THRIFT-184?focusedCommentId=13146043&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13146043>>of
the comments refers to the build that incorporates manifest metadata in the
Thrift's jar. I tried this bundle and it seems incomplete at the least:
1. It does not export other packages, such as org.apache.thrift.transport,
org.apache.thrift.server, etc (for instance, I need
org.apache.thrift.transport exported to implement my own transport).
2. It does not import packages on which it depends. For instance,
javax.servlet or various org.apache.http.* packages. Therefore I presume it
will fail to work properly in OSGi runtime as well.
3. The version 0.8.0-snapshot appearing in the manifest is invalid.
According to OSGi spec the version should be in form:
version ::=
major( '.' minor ( '.' micro ( '.' qualifier )? )? )?
major ::= number // See 1.3.2
minor ::= number
micro ::= number
qualifier ::= ( alphanum | '_' | '-' )+
Additionally, It does not resolve in Eclipse PDE as a consequence of point
2, 3, as far as I am concerned. Should the THRIFT-184<
https://issues.apache.org/**jira/browse/THRIFT-184<https://issues.apache.org/jira/browse/THRIFT-184>>
be reopened?
I am really looking forward to your reply.
--
Best regards,
Ivan Larionov
--
Best regards,
Ivan Larionov