I am downloading spring - osgi jars from following repository,

http://www.springsource.com/repository/app/

I have currently downloaded following jars.

com.springsource.org.apache.commons.logging-1.1.1.jar
spring.jar
backport-util-concurrent-3.1.jar
spring-osgi-core-1.1.0.jar
spring-osgi-extender-1.1.0.jar
spring-osgi-io-1.1.0.jar

  The problem I am facing is that all the above jars have version specific
import packages, 
in which many of them specified version ranges in Import/Export package. 
(Example: Import-Package: org.aopalliance.aop;version="[1.0.0, 2.0.0)" )
  I am using bindex to generate repository.xml, and when I try to add this
repository.xml URL to
felix using 

        obr add-url myrepo/repository.xml

then I am getting following exception.

        org.osgi.framework.InvalidSyntaxException: expected ~=|>=|<= 
        
So can u plz provide me with the hack of the bindex tool so that i can use
the generated repository xml
in the correct format mentioned in the thread above.


Stuart McCulloch wrote:
> 
> 2008/11/17 Sriharsha <[EMAIL PROTECTED]>
> 
>>
>> I am facing an issue with package level version with bindex and OBR,
>> previously I was using required bundle, now I am writing dependencies on
>> packages,
>>
>> Problem is ,
>>
>> Bundle1 requires a packages called com.foo (version range from 1.0 to
>> 2.0),
>> where in the package com.foo is exported by bundles Bundle2,version-1.1
>> and
>> Bundle3,version-1.0 respectively.
>>
>> Manifest of Bundle1 looks like ;
>>
>> Manifest-Version: 1.0
>> Bundle-Name: Bundle1
>> Bundle-Activator: com.abc.consumer.ConsumerActivator
>> Import-Package: org.osgi.framework, com.foo;version="[1.0,2.0)"
>> Bundle-ManifestVersion: 2
>> Bundle-SymbolicName: Bundle1
>> Bundle-Version: 1.0.0
>>
>> then the generated repository.xml have the following content,
>>
>> <resource id='Bundle1/1.0.0' presentationname='Bundle1'
>> symbolicname='Bundle1' uri='bundles/Bundle1/1.0.0/Bundle1_1.0.0.jar'
>> version='1.0.0'>
>>    <size>
>>      1709
>>    </size>
>>    <capability name='bundle'>
>>      <p n='manifestversion' v='2'/>
>>      <p n='presentationname' v='Bundle1'/>
>>      <p n='symbolicname' v='Bundle1'/>
>>      <p n='version' t='version' v='1.0.0'/>
>>    </capability>
>> <require extend='false'
>> filter='(&amp;(package=com.foo)(version&gt;=1.0.0)(version&lt;2.0.0))'
>> multiple='false' name='package' optional='false'>
>>       Import package com.foo;version=[1.0.0,2.0.0)
>>    </require>
>>    <require extend='false'
>> filter='(&(package=org.osgi.framework)(version>=0.0.0))' multiple='false'
>> name='package' optional='false'>
>>      Import package org.osgi.framework
>>    </require>
>> </resource>
>>
>>
>> But when i try to deploy Bundle1 then I am getting the following
>> exception,
>>
>>         org.osgi.framework.InvalidSyntaxException: expected ~=|>=|<=
>>
>> Please suggest a way to come out of this exception, or correct me if
>> something is wrong in the above manifest.
>>
> 
> the problem is because the Felix bundlerepository re-uses the framework
> LDAP filter implementation rather than implementing its own filter+parser
> 
>   http://issues.apache.org/jira/browse/FELIX-759
> 
> the OBR RFC states that the OBR filter should accept < and > operators,
> but these are not currently supported by the Felix framework filter
> because
> the R4 specification did not originally include them as permitted
> operators
> 
> so basically, it's a mismatch between the OBR and framework filter specs
> 
> another workaround would be to patch bindex (et. al) to avoid using these
> operators, but this would be a hack because the OBR spec clearly allows
> both < and >, it's just the Felix bundlerepository that doesn't like them
> 
> Thanks in advance,
>> Sriharsha.
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/bindex-tool-is-unable-to-retain-the-Require-Bundle-bundle-version-info-in-the-repository.xml-tp20297305p20537950.html
>> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -- 
> Cheers, Stuart
> 
> 


-----
Sriharsha

-- 
View this message in context: 
http://www.nabble.com/bindex-tool-is-unable-to-retain-the-Require-Bundle-bundle-version-info-in-the-repository.xml-tp20297305p20798030.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to