Hi,
I have some comments: why not using directly Karaf instead of inside Virgo ?
Why can't you use mvn ? You can always provision the Karaf system folder
which is actually an embedded Maven repository.
Yes, you can use "regular" URLs (like file or http), at runtime (using
feature:repo-add for instance) or before (using
etc/org.apache.karaf.features.cfg).
Variable substitution is not supported yet (it's a good idea by the way,
and worth to create a Jira), but you can prepare it at buildtime.
Yes, <configfile/> can also use any kind of URL (http, file, mvn, ...).
I don't think OBR is a good idea, however Karaf Cave is ;)
You can deploy all in Karaf Cave repository, and then use this
repository (via mvn or http URL).
Cave basically provides two things:
- Cave repository is interesting for you as it can store any kind of
artifacts that you can use in your Karaf instances
- Cave Features Gateway is just a "wrapper" of multiple features XML in
one big XML. You just do the feature:repo-add of the Gateway XML instead
of each individual XML locations. The gateway XML is managed by service.
Don't hesitate to ping me directly if you need more details or advices.
Regards
JB
On 05/11/2019 13:02, giamma wrote:
> Hello,
>
> I am testing on Karaf an OSGi application that runs successfully in Eclipse
> Virgo, WebSphere Liberty and plain Equinox (bndrun) using Pax Web.
>
> The application is running as expected, and in order to provision it I
> created a XML feature repository file containing several features and
> configurations.
>
> When creating the feature file if I don't or can't use maven URLs, can I use
> variable substitutions in file:// URLs in orther to pickup bundles that I
> copied into a folder, e.g.:
>
> file:///${karaf.base}/mybundles/my.bundle.jar
>
> Can I do the same to copy to e.g. ${karaf.etc} additional configuration
> files (<configfile> feature element)?
>
> As an alternative approach, I would like to try OBR, which would make the
> deployment more similar to that of Eclipse Virgo and WebSphere Liberty,
> letting me re-use more of the existing build scripts.
>
> By reading the documentation I understood that:
> 1 - I should install Karaf Cave which provides an OBR repository
> 2 - I should install OBR which will let Karaf resolve bundle requirements
> against Cave
> 3 - I should deploy my top-level bundles either manually or by placing them
> in the OBR repository
> and by listing them in a feature using an "obr:" URL.
> 4 - required bundle dependencies will be found by OBR in the Cave repository
> and will be deployed for me
>
>
> The Karaf documentation explains how to use Cave and how to create and
> populate a repository, but:
> * - the latest version of Cave, 4.2.0 has completely different shell
> commands, in particular "upload" is gone
> * - Cave 4.2.0 documentation describes a gateway command (don't know if that
> helps) but that command
> does not show up in the shell even after installing the corresponding
> feature as documented in the guide
>
> With respect to Cave my questions are:
> * - how can I create an OBR repository, populate it, and use it for
> resolution when using Karaf 4.2.7 and
> Cave 4.2.0? If this is only possible with Cave 4.1.x, will the same
> capability be available in a future
> Cave 4.2.x or is this deprecated?
> * - is there a way for Cave to monitor the repo folder and auto-update the
> repository.xml (like Virgo and
> WebSphere do, which do not even use repository.xml) or do I have to
> manually update the
> repository every time a bundle is changed?
>
> Thanks in advance.
> Giamma.
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>
--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com