First, i'm the second developper (frenchy like you :)) of the young
Bushel project.
How to manage OSGi Import-Package and Export-Package is an excellent
debate! Indeed, combine dependencies management via package and via
module id is not easy.
I don't sure that use "<dependency org="_pkg_"
name="com.acme.echo.aaa" ... is the best way.
I think we must prefer use specific extra medatas to add OSGi semantic
in Ivy data model.
In example :
<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0" xmlns:osgi="http://ant.apache.org/ivy/osgi">
<info osgi:bundle="true" organisation="com.acme" module="test"
revision="1.0.1" status="release"/>
<publications>
<artifact name="com.acme.test" type="jar"
osgi:Export-Package="com.acme.pkg1,com.acme.pkg2"/>
</publications>
<dependencies defaultconf="bundle">
<!-- like Require-bundle -->
<dependency org="com.acme" name="alpha" rev="1.0.0"/>
<!-- like Import-Package -->
<dependency org="com.acme" name="beta" rev="1.0.0"
osgi:Import-Package="com.acme.alpha.pkg1, com.acme.alpha.pkg2"/>
</dependencies>
</ivy-module>
And I agree to use repository.xml file publish on repository side like
http://felix.apache.org/obr/releases.xml to optimitize HTTP
connections!
What do you think about it ?
Cheers,
Jérôme.
--
"Code is a model, Show me the model!"
http://www.benois.fr
Alex, I use already Hudson with Ivy2 with this patch
(http://www.benois.fr/hudsonIvy2.patch), maybe it will help you.
You're write my proposal doesn't solve Import-Package use case. And I
think also the _pkg_ solution isn't ideal. But maybe you can use fake
org=_pkg_ in internal and extends ivy semantic with a complete osgi
namespace.
In example this bloc:
<dependencies>
<dependency org="com.acme" name="alpha" rev="1.0.0"/>
<osgi:Import-Package name="com.acme.alpha.pkg1" rev="1.0.0"
visibility="reexport"/>
<osgi:Import-Package name="com.acme.alpha.pkg2" rev="1.0.0"
resolution="optional" />
</dependencies>
represent this :
<dependencies>
<dependency org="com.acme" name="alpha" rev="1.0.0"/>
<dependency org="_pkg_" name="com.acme.alpha.pkg1" rev="1.0.0"
osgi:visibility="reexport"/>
<dependency org="_pkg_" name="com.acme.alpha.pkg2" rev="1.0.0"
osgi:resolution="optional" />
</dependencies>
It's similar concept of Namespace supported by Spring Framework.
Indeed, spring provide an extensible syntax grammar with pluggable
NamespaceHandlerSupport, see : http://tinyurl.com/5n4a4w
Maybe we can choose the same way to propose clean OSGI Ivy module
descriptor without visible fake _pkg_.
What do you think ?
And a great +1 if Nicolas want to became a project member of Bushel!