You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Richard Mauri <rm...@ariba.com> on 2012/01/27 19:13:59 UTC

ivy (2.3) and osgi

Greetings, we are investigating alternatives to building osgi bundles
(and resolving/retrieving bundles for ease of copying to
virgo-tomcat/repository/usr) in an "ivy-first" approach.

 

I found the following docs which encourage me and I'd love to get
started with this and help if need be.

 

According to http://ant.apache.org/ivy/history/trunk/osgi.html

So with a standard ivy.xml, you can express some dependency on some OSGi
bundle and every of their trasitive dependencies will be resolved. You
can also declare in your ivy.xml some OSGi dependency, like a
Require-Bundle, an Import-Package or an Import-Service, miming an OSGi
MANIFEST.MF.

 

According to
http://ant.apache.org/ivy/history/trunk/osgi/standard-osgi.html

In oder to produce OSGi metadata of suffient quality and to avoid
maintaining them manually, the bnd <http://www.aqute.biz/Code/Bnd>  tool
will be used. The approach taken is then an "Ivy file first" approach.
The dependencies will be specified in the ivy.xml file, the MANIFEST.MF
being generated from the computed classpath.

 

Then, on the other hand I see this support for manifest-first docs:

According to
http://ant.apache.org/ivy/history/trunk/osgi/osgi-mapping.html

there is early experimental work to map osgi manifest first to generated
ivy.xml

 

Also http://ant.apache.org/ivy/history/trunk/use/convertmanifest.html

since 2.3 Convert a MANIFEST.MF into an ivy.ml file

 

Sigh.. no mention of any sort of genbnd or genmanifest ant tasks

 

Can someone clarify encourage me and shed a timeline for if/when this
might be able to be used?

 

Can I getstarted now? Do I have to build ltest from src? Also the
http://ant.apache.org/ivy/history/trunk/osgi/standard-osgi.html
quick-setup link to download the bnd file seems broken (no content) 

 

Thanks,
Richard

 

 

 

 


Re: ivy (2.3) and osgi

Posted by Nicolas Lalevée <ni...@hibnet.org>.
Le 27 janv. 2012 à 19:13, Richard Mauri a écrit :

> Greetings, we are investigating alternatives to building osgi bundles
> (and resolving/retrieving bundles for ease of copying to
> virgo-tomcat/repository/usr) in an "ivy-first" approach.
> 
> 
> 
> I found the following docs which encourage me and I'd love to get
> started with this and help if need be.
> 
> 
> 
> According to http://ant.apache.org/ivy/history/trunk/osgi.html
> 
> So with a standard ivy.xml, you can express some dependency on some OSGi
> bundle and every of their trasitive dependencies will be resolved. You
> can also declare in your ivy.xml some OSGi dependency, like a
> Require-Bundle, an Import-Package or an Import-Service, miming an OSGi
> MANIFEST.MF.
> 
> 
> 
> According to
> http://ant.apache.org/ivy/history/trunk/osgi/standard-osgi.html
> 
> In oder to produce OSGi metadata of suffient quality and to avoid
> maintaining them manually, the bnd <http://www.aqute.biz/Code/Bnd>  tool
> will be used. The approach taken is then an "Ivy file first" approach.
> The dependencies will be specified in the ivy.xml file, the MANIFEST.MF
> being generated from the computed classpath.
> 
> 
> 
> Then, on the other hand I see this support for manifest-first docs:
> 
> According to
> http://ant.apache.org/ivy/history/trunk/osgi/osgi-mapping.html
> 
> there is early experimental work to map osgi manifest first to generated
> ivy.xml
> 
> 
> 
> Also http://ant.apache.org/ivy/history/trunk/use/convertmanifest.html
> 
> since 2.3 Convert a MANIFEST.MF into an ivy.ml file
> 
> 
> 
> Sigh.. no mention of any sort of genbnd or genmanifest ant tasks

The bnd should be wrote by yourself. If you don't have a too much complicated classpath, it will be probably mostly empty. Actually the one in the example is empty on purpose.
Then the task about generating the MANIFEST.MF is the bnd one, see the target "generate-manifest" in the build.xml of the example.
You can download the bnd task there: http://www.aqute.biz/Code/Bnd

Nicolas


Re: ivy (2.3) and osgi

Posted by Nicolas Lalevée <ni...@hibnet.org>.
Le 28 janv. 2012 à 18:07, David Goblirsch a écrit :

> Nicolas Lalevée wrote:
>> Le 27 janv. 2012 à 19:33, jerome.moliere@gmail.com a écrit :
>> 
>>  
>>> Hi richard
>>> I set up a platform with about 350 bundles ...
>>> I use plain ivy and I duplicated part from the meta information into bnd files to let ant generate the bundles using bnd task...
>>> It has some overhead but it s clean and works nice
>>>    
>> 
>> good to hear !
>> 
>> Nicolas
>> 
>>  
> 
> I would like to not duplicate meta data in bnd template file if possible.
> 
> I already have rev information in my ivy file, so it would be nice if that
> info could make it into the osgi manifest, e.g., OSGi version ranges in the
> Import-Package:  based on the ivy rev attribute patterns.
> E.g., have dependencies like commons-lang [2.6,3[, slf4j-api [1.6.3,)
> get turned into properly structured OSGi version syntax.

The Import-Package dependencies have a different version scheme from the Require-Bundle ones. So one is not translatable into the other.
I guess bnd could do something about it, but only if there is some version information in the manifest of commons-lang. Is there some ?

Nicolas


Re: ivy (2.3) and osgi

Posted by Nicolas Lalevée <ni...@hibnet.org>.
Le 31 janv. 2012 à 18:38, Richard Mauri a écrit :

> So is this statement from ivy trunk docs misleading/wrong or ?
> 
> "You can also declare in your ivy.xml some OSGi dependency, 
> like a Require-Bundle, an Import-Package or an Import-Service, miming 
> an OSGi MANIFEST.MF."
> 
> My takeaway from this thread so far is that we must duplicate and invent some ad-hoc mapping between ivy and bnd files.

For my point of view, and it is just mine, and it could probably change from your input because I don't have much experience with managing OSGi dependencies. The workflow should be the following one:
* declare manually some dependencies in the ivy.xml so build a classpath. These dependencies can be declared in the standard ivy way, while targeting an usual ivy/maven repository, or declared in an OSGi way while targeting an OBR.
* then ivy download stuff and build a classpath of bundles; with that classpath you can build you project, or even run the unit tests
* and with this classpath, bnd (with probably some little help of a bnd file) should be able to generate a MANIFEST.MF so you can produce a bundle of your project. 

If I'm missing something, please let me know.

Nicolas

> 
> Is it clear to anyone?
> 
> 
> -----Original Message-----
> From: David Goblirsch [mailto:dgoblirsch@interactivebrokers.com] 
> Sent: Saturday, January 28, 2012 9:08 AM
> To: ivy-user@ant.apache.org
> Subject: Re: ivy (2.3) and osgi
> 
> Nicolas Lalevée wrote:
>> Le 27 janv. 2012 à 19:33, jerome.moliere@gmail.com a écrit :
>> 
>> 
>>> Hi richard
>>> I set up a platform with about 350 bundles ...
>>> I use plain ivy and I duplicated part from the meta information into bnd files to let ant generate the bundles using bnd task...
>>> It has some overhead but it s clean and works nice
>>> 
>> 
>> good to hear !
>> 
>> Nicolas
>> 
>> 
> 
> I would like to not duplicate meta data in bnd template file if possible.
> 
> I already have rev information in my ivy file, so it would be nice if that
> info could make it into the osgi manifest, e.g., OSGi version ranges in the
> Import-Package:  based on the ivy rev attribute patterns.
> E.g., have dependencies like commons-lang [2.6,3[, slf4j-api [1.6.3,)
> get turned into properly structured OSGi version syntax.
> 
> Is this possible?
> 
> 
> 


RE: ivy (2.3) and osgi

Posted by Richard Mauri <rm...@ariba.com>.
So is this statement from ivy trunk docs misleading/wrong or ?

"You can also declare in your ivy.xml some OSGi dependency, 
like a Require-Bundle, an Import-Package or an Import-Service, miming 
an OSGi MANIFEST.MF."

My takeaway from this thread so far is that we must duplicate and invent some ad-hoc mapping between ivy and bnd files.

Is it clear to anyone?


-----Original Message-----
From: David Goblirsch [mailto:dgoblirsch@interactivebrokers.com] 
Sent: Saturday, January 28, 2012 9:08 AM
To: ivy-user@ant.apache.org
Subject: Re: ivy (2.3) and osgi

Nicolas Lalevée wrote:
> Le 27 janv. 2012 à 19:33, jerome.moliere@gmail.com a écrit :
>
>   
>> Hi richard
>> I set up a platform with about 350 bundles ...
>> I use plain ivy and I duplicated part from the meta information into bnd files to let ant generate the bundles using bnd task...
>> It has some overhead but it s clean and works nice
>>     
>
> good to hear !
>
> Nicolas
>
>   

I would like to not duplicate meta data in bnd template file if possible.

I already have rev information in my ivy file, so it would be nice if that
info could make it into the osgi manifest, e.g., OSGi version ranges in the
Import-Package:  based on the ivy rev attribute patterns.
E.g., have dependencies like commons-lang [2.6,3[, slf4j-api [1.6.3,)
get turned into properly structured OSGi version syntax.

Is this possible?




Re: ivy (2.3) and osgi

Posted by David Goblirsch <dg...@interactivebrokers.com>.
Nicolas Lalevée wrote:
> Le 27 janv. 2012 à 19:33, jerome.moliere@gmail.com a écrit :
>
>   
>> Hi richard
>> I set up a platform with about 350 bundles ...
>> I use plain ivy and I duplicated part from the meta information into bnd files to let ant generate the bundles using bnd task...
>> It has some overhead but it s clean and works nice
>>     
>
> good to hear !
>
> Nicolas
>
>   

I would like to not duplicate meta data in bnd template file if possible.

I already have rev information in my ivy file, so it would be nice if that
info could make it into the osgi manifest, e.g., OSGi version ranges in the
Import-Package:  based on the ivy rev attribute patterns.
E.g., have dependencies like commons-lang [2.6,3[, slf4j-api [1.6.3,)
get turned into properly structured OSGi version syntax.

Is this possible?




Re: ivy (2.3) and osgi

Posted by Nicolas Lalevée <ni...@hibnet.org>.
Le 27 janv. 2012 à 19:33, jerome.moliere@gmail.com a écrit :

> Hi richard
> I set up a platform with about 350 bundles ...
> I use plain ivy and I duplicated part from the meta information into bnd files to let ant generate the bundles using bnd task...
> It has some overhead but it s clean and works nice

good to hear !

Nicolas

> ---- Envoyé avec BlackBerry® d'Orange ----
> 
> -----Original Message-----
> From: "Richard Mauri" <rm...@ariba.com>
> Date: Fri, 27 Jan 2012 10:13:59 
> To: <iv...@ant.apache.org>
> Reply-To: ivy-user@ant.apache.org
> Subject: ivy (2.3) and osgi
> 
> Greetings, we are investigating alternatives to building osgi bundles
> (and resolving/retrieving bundles for ease of copying to
> virgo-tomcat/repository/usr) in an "ivy-first" approach.
> 
> 
> 
> I found the following docs which encourage me and I'd love to get
> started with this and help if need be.
> 
> 
> 
> According to http://ant.apache.org/ivy/history/trunk/osgi.html
> 
> So with a standard ivy.xml, you can express some dependency on some OSGi
> bundle and every of their trasitive dependencies will be resolved. You
> can also declare in your ivy.xml some OSGi dependency, like a
> Require-Bundle, an Import-Package or an Import-Service, miming an OSGi
> MANIFEST.MF.
> 
> 
> 
> According to
> http://ant.apache.org/ivy/history/trunk/osgi/standard-osgi.html
> 
> In oder to produce OSGi metadata of suffient quality and to avoid
> maintaining them manually, the bnd <http://www.aqute.biz/Code/Bnd>  tool
> will be used. The approach taken is then an "Ivy file first" approach.
> The dependencies will be specified in the ivy.xml file, the MANIFEST.MF
> being generated from the computed classpath.
> 
> 
> 
> Then, on the other hand I see this support for manifest-first docs:
> 
> According to
> http://ant.apache.org/ivy/history/trunk/osgi/osgi-mapping.html
> 
> there is early experimental work to map osgi manifest first to generated
> ivy.xml
> 
> 
> 
> Also http://ant.apache.org/ivy/history/trunk/use/convertmanifest.html
> 
> since 2.3 Convert a MANIFEST.MF into an ivy.ml file
> 
> 
> 
> Sigh.. no mention of any sort of genbnd or genmanifest ant tasks
> 
> 
> 
> Can someone clarify encourage me and shed a timeline for if/when this
> might be able to be used?
> 
> 
> 
> Can I getstarted now? Do I have to build ltest from src? Also the
> http://ant.apache.org/ivy/history/trunk/osgi/standard-osgi.html
> quick-setup link to download the bnd file seems broken (no content) 
> 
> 
> 
> Thanks,
> Richard
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 


Re: ivy (2.3) and osgi

Posted by je...@gmail.com.
Hi richard
I set up a platform with about 350 bundles ...
I use plain ivy and I duplicated part from the meta information into bnd files to let ant generate the bundles using bnd task...
It has some overhead but it s clean and works nice
---- Envoyé avec BlackBerry® d'Orange ----

-----Original Message-----
From: "Richard Mauri" <rm...@ariba.com>
Date: Fri, 27 Jan 2012 10:13:59 
To: <iv...@ant.apache.org>
Reply-To: ivy-user@ant.apache.org
Subject: ivy (2.3) and osgi

Greetings, we are investigating alternatives to building osgi bundles
(and resolving/retrieving bundles for ease of copying to
virgo-tomcat/repository/usr) in an "ivy-first" approach.

 

I found the following docs which encourage me and I'd love to get
started with this and help if need be.

 

According to http://ant.apache.org/ivy/history/trunk/osgi.html

So with a standard ivy.xml, you can express some dependency on some OSGi
bundle and every of their trasitive dependencies will be resolved. You
can also declare in your ivy.xml some OSGi dependency, like a
Require-Bundle, an Import-Package or an Import-Service, miming an OSGi
MANIFEST.MF.

 

According to
http://ant.apache.org/ivy/history/trunk/osgi/standard-osgi.html

In oder to produce OSGi metadata of suffient quality and to avoid
maintaining them manually, the bnd <http://www.aqute.biz/Code/Bnd>  tool
will be used. The approach taken is then an "Ivy file first" approach.
The dependencies will be specified in the ivy.xml file, the MANIFEST.MF
being generated from the computed classpath.

 

Then, on the other hand I see this support for manifest-first docs:

According to
http://ant.apache.org/ivy/history/trunk/osgi/osgi-mapping.html

there is early experimental work to map osgi manifest first to generated
ivy.xml

 

Also http://ant.apache.org/ivy/history/trunk/use/convertmanifest.html

since 2.3 Convert a MANIFEST.MF into an ivy.ml file

 

Sigh.. no mention of any sort of genbnd or genmanifest ant tasks

 

Can someone clarify encourage me and shed a timeline for if/when this
might be able to be used?

 

Can I getstarted now? Do I have to build ltest from src? Also the
http://ant.apache.org/ivy/history/trunk/osgi/standard-osgi.html
quick-setup link to download the bnd file seems broken (no content) 

 

Thanks,
Richard