You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Jeremias Maerki <de...@jeremias-maerki.ch> on 2010/11/19 14:05:35 UTC

Building OSGi bundles with Apache Ant

Hi there,

if anyone is producing OSGi bundles with Apache Ant and is not quite
happy with Bnd (as I was), please have a look at my OSGi bundle utility
I've published yesterday. Maybe it's useful to someone. Feedback welcome.

http://www.jeremias-maerki.ch/blog/2010/11/18/osgi-bundle-utility-1-0-released
http://www.jeremias-maerki.ch/development/osgi/bundle-utility.html

Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Building OSGi bundles with Apache Ant

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 19.11.2010 15:24:49 Peter Kriens wrote:
> Sorry to hear you found bnd in ant too hard. However, wouldn't it be
> better to help to make a front end for bnd in ant because that is where
> your pain seems to be?

Actually, it wasn't just the Ant integration itself. At some point, I
had trouble getting something to work. I started debugging but couldn't
figure out how to fix it. I'm sorry, but I don't remember after over
year what exactly the problem was.

> Just looking at your source code it seems you miss a few references
> (annotations that refer to classes, the Xyz.class reference (which is
> done differently in different compiler x version combinations, create
> references to annotations that are not necessary, etc). You also miss
> some really important features like version policies and lack of any
> validation. And though importing exported packages is good, there are
> unfortunately cases where it causes problems.

I'm sure there are cases that are not covered. I have a warning about
that in the documentation. So far, it works very well for me.

> So why is bnd's ant support not so good? Though I use use ant, in my
> case ant is just for compilation and leave the rest to bnd. I also just
> do not like XML :-( However, you're requirement is legit. 

Well, and I've had trouble mastering the Bnd format.

> I'd actually like to ask you to use bnd under the covers for your work
> instead of redoing this work and having to relearn a lot of the lessons.
> I think it is actually quite easy using the bndlib and the Builder.
> This will allow you to have an XML syntax that is more comfortable for you
> while not missing out on the large experience that bnd carries. And
> maybe even more important, when you need that complicated feature when
> your bundles become more complex, it is actually already there.
>
> Let me know if you would like to do this and need some help getting started. Kind regards,

I understand your reasoning and appreciate your offer, but given the
amount of work I've already invested (writing the docs probably took me
almost as long as writing the actual code), I cannot currently allocate
more (my itch is scratched). I've had people asking me to publish my
thingy and so I did. I think diversity is good and if my utility fits
for someone, I think that's good enough, too. I certainly didn't do this
to criticise your work. Given that practically everyone uses Bnd tells a
story by itself. I simply wasn't comfortable with Bnd, so I did what too
many developers constantly do: re-invent the wheel. ;-) Maybe I'll give
Bnd another try at some point. After all, I still need to finish
OSGi-ification of Apache FOP/Batik. At any rate, I'll keep your
suggestion in mind. I may come back to it one day.

Thank you for your feedback!!!

> 
> 	Peter Kriends
> 
> 
> 
> 
> On 19 nov 2010, at 14:05, Jeremias Maerki wrote:
> 
> > Hi there,
> > 
> > if anyone is producing OSGi bundles with Apache Ant and is not quite
> > happy with Bnd (as I was), please have a look at my OSGi bundle utility
> > I've published yesterday. Maybe it's useful to someone. Feedback welcome.
> > 
> > http://www.jeremias-maerki.ch/blog/2010/11/18/osgi-bundle-utility-1-0-released
> > http://www.jeremias-maerki.ch/development/osgi/bundle-utility.html



Best,
Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Building OSGi bundles with Apache Ant

Posted by Peter Kriens <pe...@aqute.biz>.
Sorry to hear you found bnd in ant too hard. However, wouldn't it be better to help to make a front end for bnd in ant because that is where your pain seems to be?

Just looking at your source code it seems you miss a few references (annotations that refer to classes, the Xyz.class reference (which is done differently in different compiler x version combinations, create references to annotations that are not necessary, etc). You also miss some really important features like version policies and lack of any validation. And though importing exported packages is good, there are unfortunately cases where it causes problems.

So why is bnd's ant support not so good? Though I use use ant, in my case ant is just for compilation and leave the rest to bnd. I also just do not like XML :-( However, you're requirement is legit. 

I'd actually like to ask you to use bnd under the covers for your work instead of redoing this work and having to relearn a lot of the lessons. I think it is actually quite easy using the bndlib and the Builder. This will allow you to have an XML syntax that is more comfortable for you while not missing out on the large experience that bnd carries. And maybe even more important, when you need that complicated feature when your bundles become more complex, it is actually already there.

Let me know if you would like to do this and need some help getting started. Kind regards,

	Peter Kriends




On 19 nov 2010, at 14:05, Jeremias Maerki wrote:

> Hi there,
> 
> if anyone is producing OSGi bundles with Apache Ant and is not quite
> happy with Bnd (as I was), please have a look at my OSGi bundle utility
> I've published yesterday. Maybe it's useful to someone. Feedback welcome.
> 
> http://www.jeremias-maerki.ch/blog/2010/11/18/osgi-bundle-utility-1-0-released
> http://www.jeremias-maerki.ch/development/osgi/bundle-utility.html
> 
> Jeremias Maerki
> 
> 
> ---------------------------------------------------------------------
> 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