You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Matt Hughes <hu...@gmail.com> on 2011/06/06 20:39:51 UTC
Provider Version Policy
I'm trying to configure a separate version policy for providers vs
consumers as described here (http://www.aqute.biz/Bnd/Versioning).
However, I can't seem to get maven-bundle-plugin and/or bnd to
cooperate. Here is my bundle-plugin config:
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.3.4</version>
<extensions>true</extensions>
<configuration>
<instructions>
<_versionpolicy>[$(version;===;$(@)),$(version;+;$(@)))</_versionpolicy>
<_providerversionpolicy>[$(version;===;$(@)),$(version;=+;$(@)))</_providerversionpolicy>
<_provider_policy>[$(version;===;$(@)),$(version;=+;$(@)))</_provider_policy>
</instructions>
</configuration>
</plugin>
I couldn't find docs on the mbp's website detailing acceptable values
for the <instructions> tag, so I tried some logical combinations for
-provider-policy.
Here is my osgi.bnd file that is trying to mark a package as a provider:
Export-Package: org.osgi.service.event;provide:=true
Now with that configured, the import range for that package should be
[1.5,1.6); instead it uses the regular version policy of [1.5,2). Any
ideas? Am I missing where the docs are located detailing the various
<instructions> flags?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Provider Version Policy
Posted by Matt Hughes <hu...@gmail.com>.
I fixed the issue. I thought it was illegal XML to have a dash *anywhere* in an XML element; it's only illegal at the start of element name. Looking through the maven-bundle-plugin source, I see that they replace the first underscore with a dash; I thought that was a bug and it should have replaced all underscores -> dashes before passing to BND. Turns out, it's just the first dash that is illegal.
<_provider-policy> works as expected.
Thanks!
On Tuesday, June 7, 2011 at 12:22 PM, Matt Hughes wrote:
> Hmm. Well I think I am looking at the correct page on aqute's website. I know I need to pass in -provider-policy ultimately to bnd, but I'm looking to confirm how that argument gets translated when calling it from the *maven-bundle-plugin*. You can't have dashes in xml element names, so I presume it would be underscore as that is how "-versionpolicy" gets translated.
>
> As you can see in my pom snippet, I've tried
>
> <_providerversionpolicy>
> <_provider_policy>
>
> and I've also tried
>
> <_providerpolicy>
>
>
> Is there some sort of debugging that I can turn up to confirm Maven is ultimately passing the correct arguments to the BND library?
>
> On Tuesday, June 7, 2011 at 4:55 AM, Peter Kriens wrote:
>
> > For the instructions you have to be at the bnd documentation: http://www.aqute.biz/Bnd/Bnd
> >
> > Kind regards,
> >
> > Peter Kriens
> >
> >
> >
> > On 6 jun 2011, at 20:39, Matt Hughes wrote:
> >
> > > I'm trying to configure a separate version policy for providers vs
> > > consumers as described here (http://www.aqute.biz/Bnd/Versioning).
> > >
> > > However, I can't seem to get maven-bundle-plugin and/or bnd to
> > > cooperate. Here is my bundle-plugin config:
> > >
> > > <plugin>
> > > <groupId>org.apache.felix</groupId>
> > > <artifactId>maven-bundle-plugin</artifactId>
> > > &llt;version>2.3.4</version>
> > > <extensions>true</extensions>
> > > <configuration>
> > > <instructions>
> > > <_versionpolicy>[$(version;===;$(@)),$(version;+;$(@)))</_versionpolicy>
> > > <__providerversionpolicy>[$(version;===;$(@)),$(version;=+;$(@)))</_providerversionpolicy>
> > > <__provider_policy>[$(version;===;$(@)),$(version;=+;$(@)))</_provider_policy>
> > > </instructions>
> > > </configuration>
> > > </plugin>
> > >
> > > I couldn't find docs on the mbp's website detailing acceptable values
> > > for the <instructions> tag, so I tried some logical combinations for
> > > -provider-policy.
> > >
> > > Here is my osgi.bnd file that is trying to mark a package as a provider:
> > >
> > > Export-Package: org.osgi.service.event;provide:=true
> > >
> > >
> > > Now with that configured, the import range for that package should be
> > > [1.5,1.6); instead it uses the regular version policy of [1.5,2). Any
> > > ideas? Am I missing where the docs are located detailing the various
> > > <instructions> flags?
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org (mailto:users-unsubscribe@felix.apache.org)
> > > For additional commands, e-mail: users-help@felix.apache.org (mailto:users-help@felix.apache.org)
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org (mailto:users-unsubscribe@felix.apache.org)
> > For additional commands, e-mail: users-help@felix.apache.org (mailto:users-help@felix.apache.org)
>
Re: Provider Version Policy
Posted by Matt Hughes <hu...@gmail.com>.
Hmm. Well I think I am looking at the correct page on aqute's website. I know I need to pass in -provider-policy ultimately to bnd, but I'm looking to confirm how that argument gets translated when calling it from the *maven-bundle-plugin*. You can't have dashes in xml element names, so I presume it would be underscore as that is how "-versionpolicy" gets translated.
As you can see in my pom snippet, I've tried
<_providerversionpolicy>
<_provider_policy>
and I've also tried
<_providerpolicy>
Is there some sort of debugging that I can turn up to confirm Maven is ultimately passing the correct arguments to the BND library?
On Tuesday, June 7, 2011 at 4:55 AM, Peter Kriens wrote:
> For the instructions you have to be at the bnd documentation: http://www.aqute.biz/Bnd/Bnd
>
> Kind regards,
>
> Peter Kriens
>
>
>
> On 6 jun 2011, at 20:39, Matt Hughes wrote:
>
> > I'm trying to configure a separate version policy for providers vs
> > consumers as described here (http://www.aqute.biz/Bnd/Versioning).
> >
> > However, I can't seem to get maven-bundle-plugin and/or bnd to
> > cooperate. Here is my bundle-plugin config:
> >
> > <plugin>
> > <groupId>org.apache.felix</groupId>
> > <artifactId>maven-bundle-plugin</artifactId>
> > <version>2.3.4</version>
> > <extensions>true</extensions>
> > <configuration>
> > <instructions>
> > <_versionpolicy>[$(version;===;$(@)),$(version;+;$(@)))</_versionpolicy>
> > <_providerversionpolicy>[$(version;===;$(@)),$(version;=+;$(@)))</_providerversionpolicy>
> > <_provider_policy>[$(version;===;$(@)),$(version;=+;$(@)))</_provider_policy>
> > </instructions>
> > </configuration>
> > </plugin>
> >
> > I couldn't find docs on the mbp's website detailing acceptable values
> > for the <instructions> tag, so I tried some logical combinations for
> > -provider-policy.
> >
> > Here is my osgi.bnd file that is trying to mark a package as a provider:
> >
> > Export-Package: org.osgi.service.event;provide:=true
> >
> >
> > Now with that configured, the import range for that package should be
> > [1.5,1.6); instead it uses the regular version policy of [1.5,2). Any
> > ideas? Am I missing where the docs are located detailing the various
> > <instructions> flags?
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org (mailto:users-unsubscribe@felix.apache.org)
> > For additional commands, e-mail: users-help@felix.apache.org (mailto:users-help@felix.apache.org)
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org (mailto:users-unsubscribe@felix.apache.org)
> For additional commands, e-mail: users-help@felix.apache.org (mailto:users-help@felix.apache.org)
Re: Provider Version Policy
Posted by Peter Kriens <pe...@aqute.biz>.
For the instructions you have to be at the bnd documentation: http://www.aqute.biz/Bnd/Bnd
Kind regards,
Peter Kriens
On 6 jun 2011, at 20:39, Matt Hughes wrote:
> I'm trying to configure a separate version policy for providers vs
> consumers as described here (http://www.aqute.biz/Bnd/Versioning).
>
> However, I can't seem to get maven-bundle-plugin and/or bnd to
> cooperate. Here is my bundle-plugin config:
>
> <plugin>
> <groupId>org.apache.felix</groupId>
> <artifactId>maven-bundle-plugin</artifactId>
> <version>2.3.4</version>
> <extensions>true</extensions>
> <configuration>
> <instructions>
> <_versionpolicy>[$(version;===;$(@)),$(version;+;$(@)))</_versionpolicy>
> <_providerversionpolicy>[$(version;===;$(@)),$(version;=+;$(@)))</_providerversionpolicy>
> <_provider_policy>[$(version;===;$(@)),$(version;=+;$(@)))</_provider_policy>
> </instructions>
> </configuration>
> </plugin>
>
> I couldn't find docs on the mbp's website detailing acceptable values
> for the <instructions> tag, so I tried some logical combinations for
> -provider-policy.
>
> Here is my osgi.bnd file that is trying to mark a package as a provider:
>
> Export-Package: org.osgi.service.event;provide:=true
>
>
> Now with that configured, the import range for that package should be
> [1.5,1.6); instead it uses the regular version policy of [1.5,2). Any
> ideas? Am I missing where the docs are located detailing the various
> <instructions> flags?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org