Reusing a tag for two purposes can be a source of bugs as well as make it more difficult to generate automated reports on feature descriptor files (an XSLT stylesheet to automate the formatting of such might have trouble distinguishing between the two potential usages of that tag.) Another option might be to retain the Maven way of naming a repository, i.e., since there is already <repositories><repository/></respositories> and <pluginRespositories><pluginRespository/></pluginResponsitories> in a pom.xml, use <featuresRepositories><featuresRepository/></featuresRepositories> with the features descriptor. This might help in the future should such configuration end up going in the Maven pom itself sometime, either as a top-level element or within the <configuration> tag of a Karaf Maven plugin.

Is it desired to be able to specify which repository you want each bundle (or feature in general) to come from? (That's not normally the Maven way of doing things, i.e., specifying specific repositories for each dependency). Then you'll probably want the ability to attach an id attribute to a featuresRepository and a featureref attribute to certain bundles (or features). But I would be careful about adding this functionality in too early before there's a demonstrated need for it, as it does add clutter and additional moving parts to the process.

Glen

On 07/28/2011 02:14 AM, Jean-Baptiste Onofré wrote:
Hi all,

For a general perspective, I think it's a good idea. I added the OSS
Sonatype repo yesterday to be able to install the jclouds features (as
the Guava OSGi bundle is not on central, it's only available on OSS
Sonatype).

Now, regarding the implementation, in the feature, we already have a
<repository/>  tag to define features descriptor. Why not reusing it to
store "really" repository ?
I think that, more than setting the repo ID in<bundle/>, I will
implicitly add the repo in the repository set. We can add an attribute
priority on<repository/>  to define in the repository is resolved
before the default one or after.

WDYT ?

Regards
JB

On 07/28/2011 07:21 AM, Ioannis Canellos wrote:
Except for the point that I have no idea how we could "marry" this idea
with
PAX-URL +1 :-) This could be definitely useful. This might be also
interesting for Karaf Cave in future versions (I could imagine).

A possible solution could be to have a tag like:

<mavneRepository id="my-repo" url="http://www.awsome-repo.com/maven2";>

The user would be able to define a repository and then add a reference to
the repository on the bundle like that:

<feature name="awsome-feature">
<bundle repo="my-repo">mvn:com.awsome/bundle/1.0</bundle>
</feature>

When the user installs awsome feature, the maven repo could be added to
pax-url config.

wdyt?



--
Glen Mazza
Application Integration Division
Talend (http://www.talend.com/ai)
blog: http://www.jroller.com/gmazza


Reply via email to