You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Guofeng Zhang <gu...@radvision.com> on 2011/12/16 11:53:31 UTC

bundle dependency: What is the way to deploy the bundles

Hi,

I have a kar, and a jar bundle which will import the packages from the kar.

When I copy both the kar and the jar to the deploy directory of fresh Karaf installation (no data directory created), then run Karaf, it seems that the jar is first deployed and the import cannot be met.

If I first run Kara, then copy the kar to the deploy, and then copy the jar, no resolver issue complained and the application works well. The late time re-launch Karaf, the application still work without any problem (refer to resolver problem).

In the case, what is the best way to deploy my application on Karaf?

Thanks

Guofeng


Re: bundle dependency: What is the way to deploy the bundles

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Guofeng,

the best way is to create a feature in which you can define the start order:

- feature A with your bundle A
- feature B define a dependency to feature A

This features XML could be package in a kar.

Regards
JB

On 12/16/2011 11:53 AM, Guofeng Zhang wrote:
> Hi,
>
> I have a kar, and a jar bundle which will import the packages from the kar.
>
> When I copy both the kar and the jar to the deploy directory of fresh
> Karaf installation (no data directory created), then run Karaf, it seems
> that the jar is first deployed and the import cannot be met.
>
> If I first run Kara, then copy the kar to the deploy, and then copy the
> jar, no resolver issue complained and the application works well. The
> late time re-launch Karaf, the application still work without any
> problem (refer to resolver problem).
>
> In the case, what is the best way to deploy my application on Karaf?
>
> Thanks
>
> Guofeng
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com