2015-11-30 12:07 GMT+01:00 Christian Schneider <ch...@die-schneider.net>:

> I think something that might work is:
>
> feature:install <SymbolicName>[;<Version-Range>]
>
> We could support this syntax alternatively to a simple feature name.
>
> Do you think we need a special way to track the installed
> application/feature bundles? Or is it good enough that they are present in
> the system as bundles? If I understood correctly then the feature
> service would uninstall bundles that are not part of an installed feature
> if they are marked as managed.
>

We don't have to track anything, it's already done.
If we translate the <SymbolicName>[;<Version-Range>] into
requirement:osgi.identity;osgi.identity=<SymbolicName>;osgi.type=<Application-Type>;version=<Version-Range>
where <Application-Type> is the type defined by the "application bundle"
(it may be osgi.bundle, i haven't checked), then everything will work as
expected.
So the command would behave exactly as the requirement-add command, with
the translation in between, that's all.

However, I don't think it's generally a good idea to add global Resource
repositories to the resolver, as it impacts all other features.
If bndtool would use a different osgi.type to identity those application
bundles, we could have an even simpler command which would take a single
argument that would be the repository xml generated by obr.  The command
would load that repo, find the application bundles, wrap them into a
feature repository, and ask the FeaturesService to install them.
If we can't easily identify those application bundles, we'd need a second
argument to specify which bundles are "application bundles" to install.

Anyway, once I'm given a repository and a set of bundles to look at, i'm
willing to look at it.


>
> In any case I think with the combination of repository indexes and
> application/feature bundles we are on a very promising path.
>
> I hope the next version of bndtools will make it easier to create the
> artifacts in a more maven centric way. So both the bundles and indexes
> created by bndtools are made available in the maven repository. This would
> then
> be a very natural integration into the karaf deployment process. We could
> then allow custom distributions to specify a mvn url to an index like we do
> for a feature. The plugin could then copy the index as well as all bundles
> referenced in the index into the karaf system dir so the result is
> standalone.
>
> Christian
>
> On 30.11.2015 11:51, Guillaume Nodet wrote:
>
>> My understanding is that, as I explained in my earlier mail,
>> you don't need features at all.
>> If you have an "application bundle" and the xml repository, that should
>> be enough, you don't have to wrap them.
>>
>> Could you please raise a JIRA and attach the artefacts needed to
>> "reproduce" the use case ? I.e. maybe a zip containing the xml repository
>> and the bundles, including the application bundle.
>> I'll investigate to make sure you can deploy it easily.
>>
>>
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Open Source Architect
> http://www.talend.com
>
>

Reply via email to