Thanks Stuart. I missed that one. With the quotes, I get the proper version in the manifest like this javax.transaction;version="[1.1.0, 1.1.0]",javax.transaction.xa;version="[1.1.0, 1.1.0]"
However I am facing another (possibly Felix) issue. Is it possible to have two copies of a package that have the same major version but different minor version and choose which one you want to import. For example, take the javax.transaction package. The system bundle exports 1.5.0 of javax.transaction and I have another bundle that exports 1.1.0. In my importing bundle, I am explicitly specifying 1.1.0 as the version that I want to import. However when I try to install it, I get the following WARNING. DEBUG: Constraint violation for 29.0 detected; module can see javax.transaction.xa from [4.0] and javax.transaction.xa from [0] WARNING: Unable to resolve bundle 29 (org.osgi.framework.BundleException: Unable to resolve due to constraint violation.) DEBUG: Constraint violation for 29.0 detected; module can see javax.transaction.xa from [4.0] and javax.transaction.xa from [0] WARNING: Unable to resolve bundle 29 (org.osgi.framework.BundleException: Unable to resolve due to constraint violation.) Thanks Annies Stuart McCulloch wrote: > > 2008/9/11 Annies <[EMAIL PROTECTED]> > >> >> Hi >> >> I want to my Import-Package to specify an exact version match for a >> particular package. >> E.g., Import-Package: foo.bar;version="[1.0.0, 1.0.0]" >> >> When I give the following configuration to the BND maven plugin, >> <Import-Package>foo.bar;version=[1.1.0,1.1.0]</Import-Package> > > > you must protect the comma in the version string by adding quotes, for > example: > > <Import-Package>foo.bar;version="[1.1.0,1.1.0]"</Import-Package> > > otherwise BND will think the comma is separating two different package > clauses > > >> it generates >> Import-Package: foo.bar;version="[1.1.0", >> >> This leads to an exception during bundle install >> java.lang.NumberFormatException: For input string: "[1" >> >> How should I do this? >> >> Thanks >> Annies >> >> >> >> >> >> -- >> View this message in context: >> http://www.nabble.com/Exact-version-match-using-BND-tp19422162p19422162.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 > > -- View this message in context: http://www.nabble.com/Exact-version-match-using-BND-tp19422162p19445080.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]

