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

Jake Farrell commented on THRIFT-184:
-------------------------------------

Is bnd necessary here since there is no activator and the goal is to make 
org.apache.thrift available to other bundles. Putting the following in the 
manifest when generating the libthrift.jar in the dist goal should solve this 
problem. 

{code:xml} 
<manifest>
  <attribute name="Implementation-Version" value="${version}"/>
  <!-- Added for OSGI support -->
  <attribute name="Bundle-Name" value="Apache Thrift"/>
  <attribute name="Bundle-Description" value="Apache Thrift library"/>    
  <attribute name="Bundle-SymbolicName" value="${thrift.groupid}"/>     
  <attribute name="Bundle-ManifestVersion" value="2"/>
  <attribute name="Bundle-Version" value="${version}"/>
  <attribute name="Export-Package" value="${thrift.groupid}"/>
  <attribute name="Import-Package" value="*"/>
</manifest>
{code}

Simple test showed this modified manifest jar loaded in felix. 
START LEVEL 1
ID|State      |Level|Name
30|Installed  |    1|Apache Thrift (0.7.0)


Siamak, if you could please test this in your setup to verify it works for what 
you are trying to accomplish i'll generate a patch and attach it. 


> Add OSGi Manifest headers to the libthrift java library to be able to use 
> Thrift in the OSGi runtime
> ----------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-184
>                 URL: https://issues.apache.org/jira/browse/THRIFT-184
>             Project: Thrift
>          Issue Type: New Feature
>          Components: Java - Library
>            Reporter: Siamak Haschemi
>            Priority: Trivial
>         Attachments: bnd-0.0.249.jar, libthrift.bnd, osgi.patch
>
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> To be able to use Thrift in the OSGi runtime (see 
> http://en.wikipedia.org/wiki/OSGi), some additional Manifest entries are 
> needed. The bnd-tool (see http://www.aqute.biz/Code/Bnd) creates this entries 
> automatically.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to