You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Nick Baker <nb...@pentaho.com> on 2014/11/26 16:53:29 UTC

Free-form Version Coercion to OSGi Compatible Version

Hey All,

We've written a deployer to transform WebJars (http://www.webjars.org) into bundles compatible with our RequireJS setup. Part of this process involves transforming the maven version into an OSGI Version. Most artifacts adhere to maven version standards, though some are just strings (SHAs, TRUNK-SNAPSHOT, etc.). I've written a simple parser to handle this. However, I'm noticing that Karaf or perhaps BND is doing the same version coercion. Can anyone point me to this class. I'm concerned I'm re-inventing the wheel and stumbling over the same edge cases.

Here's our VersionParser:
https://github.com/pentaho/pentaho-osgi-bundles/blob/master/pentaho-webjars-deployer/src/main/java/org/pentaho/osgi/platform/webjars/VersionParser.java

Thanks,
-Nick Baker

Re: Free-form Version Coercion to OSGi Compatible Version

Posted by Achim Nierbeck <bc...@googlemail.com>.
ooops,

sorry yes I meant bnd tool, aren't those spellcheckers lovely and I can't
really tell if I switched to english before or if it's the german one :-D

anyways it's best to take a look at the bnd tools project it inherited from
aqute bnd.
Karaf itself doesn't do much with bnd, it's pax-url-wrap that does it and
it itself does again just use bnd :-)

regards, Achim




2014-11-26 21:01 GMT+01:00 <ch...@kiffer.ltd.uk>:

> Hi Achim,
>
> I guess you mean:
>
> Karaf is using *bnd* under the hood.
> So you best take a look at the *bnd* tools.
>
> Gotta love those whacky spellcheckers ;-)
>
> Regards, Chris
>
> > Hi,
> >
> > Karaf is using and under the hood.
> > So you best take a look at the end tools.
> >
> > Regards, Achim
> >
> > sent from mobile device
> > Am 26.11.2014 16:54 schrieb "Nick Baker" <nb...@pentaho.com>:
> >
> >>  Hey All,
> >>
> >>  We’ve written a deployer to transform WebJars
> >> (http://www.webjars.org)
> >> into bundles compatible with our RequireJS setup. Part of this process
> >> involves transforming the maven version into an OSGI Version. Most
> >> artifacts adhere to maven version standards, though some are just
> >> strings
> >> (SHAs, TRUNK-SNAPSHOT, etc.). I’ve written a simple parser to handle
> >> this.
> >> However, I’m noticing that Karaf or perhaps BND is doing the same
> >> version
> >> coercion. Can anyone point me to this class. I’m concerned I’m
> >> re-inventing
> >> the wheel and stumbling over the same edge cases.
> >>
> >>  Here’s our VersionParser:
> >>
> >>
> https://github.com/pentaho/pentaho-osgi-bundles/blob/master/pentaho-webjars-deployer/src/main/java/org/pentaho/osgi/platform/webjars/VersionParser.java
> >>
> >>  Thanks,
> >> -Nick Baker
> >>
> >
>
>
>


-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Re: Free-form Version Coercion to OSGi Compatible Version

Posted by Nick Baker <nb...@pentaho.com>.
Haha yep. That makes more sense. People laugh at ny BlackBerry, but the auto correct is awesome.

Thanks!
Nick

Sent from my BlackBerry. I am AFK at the moment
  Original Message
From: chris.gray@kiffer.ltd.uk
Sent: Wednesday, November 26, 2014 3:04 PM
To: user@karaf.apache.org
Reply To: user@karaf.apache.org
Subject: Re: Free-form Version Coercion to OSGi Compatible Version


Hi Achim,

I guess you mean:

Karaf is using *bnd* under the hood.
So you best take a look at the *bnd* tools.

Gotta love those whacky spellcheckers ;-)

Regards, Chris

> Hi,
>
> Karaf is using and under the hood.
> So you best take a look at the end tools.
>
> Regards, Achim
>
> sent from mobile device
> Am 26.11.2014 16:54 schrieb "Nick Baker" <nb...@pentaho.com>:
>
>>  Hey All,
>>
>>  We’ve written a deployer to transform WebJars
>> (http://www.webjars.org)
>> into bundles compatible with our RequireJS setup. Part of this process
>> involves transforming the maven version into an OSGI Version. Most
>> artifacts adhere to maven version standards, though some are just
>> strings
>> (SHAs, TRUNK-SNAPSHOT, etc.). I’ve written a simple parser to handle
>> this.
>> However, I’m noticing that Karaf or perhaps BND is doing the same
>> version
>> coercion. Can anyone point me to this class. I’m concerned I’m
>> re-inventing
>> the wheel and stumbling over the same edge cases.
>>
>>  Here’s our VersionParser:
>>
>> https://github.com/pentaho/pentaho-osgi-bundles/blob/master/pentaho-webjars-deployer/src/main/java/org/pentaho/osgi/platform/webjars/VersionParser.java
>>
>>  Thanks,
>> -Nick Baker
>>
>



Re: Free-form Version Coercion to OSGi Compatible Version

Posted by ch...@kiffer.ltd.uk.
Hi Achim,

I guess you mean:

Karaf is using *bnd* under the hood.
So you best take a look at the *bnd* tools.

Gotta love those whacky spellcheckers ;-)

Regards, Chris

> Hi,
>
> Karaf is using and under the hood.
> So you best take a look at the end tools.
>
> Regards, Achim
>
> sent from mobile device
> Am 26.11.2014 16:54 schrieb "Nick Baker" <nb...@pentaho.com>:
>
>>  Hey All,
>>
>>  We’ve written a deployer to transform WebJars
>> (http://www.webjars.org)
>> into bundles compatible with our RequireJS setup. Part of this process
>> involves transforming the maven version into an OSGI Version. Most
>> artifacts adhere to maven version standards, though some are just
>> strings
>> (SHAs, TRUNK-SNAPSHOT, etc.). I’ve written a simple parser to handle
>> this.
>> However, I’m noticing that Karaf or perhaps BND is doing the same
>> version
>> coercion. Can anyone point me to this class. I’m concerned I’m
>> re-inventing
>> the wheel and stumbling over the same edge cases.
>>
>>  Here’s our VersionParser:
>>
>> https://github.com/pentaho/pentaho-osgi-bundles/blob/master/pentaho-webjars-deployer/src/main/java/org/pentaho/osgi/platform/webjars/VersionParser.java
>>
>>  Thanks,
>> -Nick Baker
>>
>



Re: Free-form Version Coercion to OSGi Compatible Version

Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi,

Karaf is using and under the hood.
So you best take a look at the end tools.

Regards, Achim

sent from mobile device
Am 26.11.2014 16:54 schrieb "Nick Baker" <nb...@pentaho.com>:

>  Hey All,
>
>  We’ve written a deployer to transform WebJars (http://www.webjars.org)
> into bundles compatible with our RequireJS setup. Part of this process
> involves transforming the maven version into an OSGI Version. Most
> artifacts adhere to maven version standards, though some are just strings
> (SHAs, TRUNK-SNAPSHOT, etc.). I’ve written a simple parser to handle this.
> However, I’m noticing that Karaf or perhaps BND is doing the same version
> coercion. Can anyone point me to this class. I’m concerned I’m re-inventing
> the wheel and stumbling over the same edge cases.
>
>  Here’s our VersionParser:
>
> https://github.com/pentaho/pentaho-osgi-bundles/blob/master/pentaho-webjars-deployer/src/main/java/org/pentaho/osgi/platform/webjars/VersionParser.java
>
>  Thanks,
> -Nick Baker
>