Re: how can I build a bundle with his dependences

2015-11-19 Thread Lu Qin
OK,Thank you very much. > 在 2015年11月20日,14:37,Jean-Baptiste Onofré 写道: > > You can embed dependencies, but it's not the correct approach in OSGi. > > Bundle import packages provided by other bundles, so just install all bundles > in the runtime. > > Regards > JB > > On 11/20/2015 07:06 AM,

Re: using bundle:watch for bundle refreshes and updates

2015-11-19 Thread Jean-Baptiste Onofré
By the way, you can specify the URL patterns to watch in the bundle:watch command (see command options). Regards JB On 11/20/2015 06:32 AM, asookazian2 wrote: I am currently using the following cmd to update an existing bundle: update 384 file:/path/to/bundleFoo.jar refresh 384 According to

Re: how can I build a bundle with his dependences

2015-11-19 Thread Jean-Baptiste Onofré
You can embed dependencies, but it's not the correct approach in OSGi. Bundle import packages provided by other bundles, so just install all bundles in the runtime. Regards JB On 11/20/2015 07:06 AM, Lu Qin wrote: Thanks for you help. For example , my project depend on mysql-driver,when I b

Re: how can I build a bundle with his dependences

2015-11-19 Thread Lu Qin
Thanks for you help. For example , my project depend on mysql-driver,when I build my project as a bundle ,can I generator the mysql-driver as a bundle together ? Or I can only manual build the mysql-driver bundle and put it into karaf deploy directory ? > 在 2015年11月20日,13:38,Jean-Baptiste Onof

Re: Populating a Cave Repository from a BND Repo

2015-11-19 Thread Jean-Baptiste Onofré
Hi David, 1/ it allows without problem, but it will be relative to Karaf home. 2/ Cave doesn't load index XML: it generates a index.xml starting from the artifacts. Cave is an alternative to other tool index XML generation. Workaround: 1/ agree, update the index.xml with absolute URLs 2/ no

Re: how can I build a bundle with his dependences

2015-11-19 Thread Jean-Baptiste Onofré
Hi Lu, It's a not a Karaf issue: in OSGi, you have to create valid bundle. Here your bundle needs a dependency deployed. What's the missing ? Regards JB On 11/20/2015 03:03 AM, Lu Qin wrote: Hi,all.I have a question when I begin use karaf.In java ,I use maven to manage project dependences

Re: using bundle:watch for bundle refreshes and updates

2015-11-19 Thread Jean-Baptiste Onofré
Hi, bundle:watch works only for mvn URL containing SNAPSHOT by default. Regards JB On 11/20/2015 06:32 AM, asookazian2 wrote: I am currently using the following cmd to update an existing bundle: update 384 file:/path/to/bundleFoo.jar refresh 384 According to this doc: https://karaf.apache.or

using bundle:watch for bundle refreshes and updates

2015-11-19 Thread asookazian2
I am currently using the following cmd to update an existing bundle: update 384 file:/path/to/bundleFoo.jar refresh 384 According to this doc: https://karaf.apache.org/manual/latest/commands/bundle-watch.html The param for the bundle:watch cmd is URLs (bundle IDs or URLs) I'd like to have a spe

how can I build a bundle with his dependences

2015-11-19 Thread Lu Qin
Hi,all.I have a question when I begin use karaf.In java ,I use maven to manage project dependences.When I use it to appoint the package as a WAR,I can build a war with my project and dependences. Now,I use karaf,and appoint the package as bundle,and I use maven-bundle-plugin to manage the bu

Re: Populating a Cave Repository from a BND Repo

2015-11-19 Thread David Leangen
Hi! Thank you very much for all your efforts yesterday! Could you please confirm my understanding? Normally, the indexed repository created by bndtools should work “out of the box” with Karaf. However, currently there are two issues impeding such use: 1) Karaf does not allow an index to have

Re: Problem with JPA 2.2.0 in Karaf 4.0.2

2015-11-19 Thread Mohammad Shamsi
Created the following ticket: https://issues.apache.org/jira/browse/ARIES-1455 Trying it with annotation approach, I am getting exception during bundle installation and installation fails. Cheers, On Thu, 19 Nov 2015 at 20:33 Christian Schneider wrote: > Sounds like a valid problem. Can you op

Re: Problem with JPA 2.2.0 in Karaf 4.0.2

2015-11-19 Thread Christian Schneider
Sounds like a valid problem. Can you open a jira issue for it? Do you also observe this problem when using the new transaction blueprint 2.0.0 using annotations? Christian Am 19.11.2015 um 16:04 schrieb mhshams: Sorry for the very late reply. I just got some time to debug the code and I think

Re: Problem with JPA 2.2.0 in Karaf 4.0.2

2015-11-19 Thread mhshams
Sorry for the very late reply. I just got some time to debug the code and I think I found the issue. The issue is reproducible by nesting the bean definition inside service definition in blueprint xml. As a workaround I can change the above definition to follow

Re: Populating a Cave Repository from a BND Repo

2015-11-19 Thread Jean-Baptiste Onofré
Hmmm, weird, the second should ;) Let me try ;) On 11/19/2015 03:34 PM, David Leangen wrote: Hi JB, At first, I did cave:repository-proxy foo http://path/to/repo/index.xml After that, I also tried cave:repository-proxy foo http://path/to/repo/ Unfortunately, neither of them update the

Re: Populating a Cave Repository from a BND Repo

2015-11-19 Thread David Leangen
Hi JB, At first, I did cave:repository-proxy foo http://path/to/repo/index.xml After that, I also tried cave:repository-proxy foo http://path/to/repo/ Unfortunately, neither of them update the local cave/foo/repository.xml file. Chee

Re: Populating a Cave Repository from a BND Repo

2015-11-19 Thread Jean-Baptiste Onofré
Hi David, did you do: cave:repository-proxy foo http://path/to/your/artifacts ? Or did you provide directly the index.xml ? Regards JB On 11/19/2015 03:20 PM, David Leangen wrote: Hi! Based on the recent discussion in bndtools… On 19/11/15 14:33, Timothy Ward wrote: The indexes generate

Populating a Cave Repository from a BND Repo

2015-11-19 Thread David Leangen
Hi! Based on the recent discussion in bndtools… >>> On 19/11/15 14:33, Timothy Ward wrote: >>> The indexes generated by a LocalIndexedRepo (the type of release repository >>> that you’re talking about) will always use relative URIs to locate the >>> bundles. This is what the Local in LocalInde

Re: Features vs. Deployment Admin

2015-11-19 Thread Jean-Baptiste Onofré
Hi David, just replied to your on the bndtools mailing list ;) You are welcome. Regards JB On 11/19/2015 01:06 PM, David Leangen wrote: (Bringing back on list…) Hmmm. Ok, I’ll bring this up with the bnd community, since it is the bnd plugin that creates the index. Thanks again so much for

Re: Features vs. Deployment Admin

2015-11-19 Thread David Leangen
(Bringing back on list…) Hmmm. Ok, I’ll bring this up with the bnd community, since it is the bnd plugin that creates the index. Thanks again so much for your help!!! Greatly appreciated! Cheers, =David On Nov 19, 2015, at 9:01 PM, Jean-Baptiste Onofré wrote: > It looks like the index.xml

Re: Dynamic parameters in persistence.xml

2015-11-19 Thread conejo
Hello, JB, Christian. This solution is perfect. Thank you very much to you both for the help. -- View this message in context: http://karaf.922171.n3.nabble.com/Dynamic-parameters-in-persistence-xml-tp4043602p4043615.html Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Dynamic parameters in persistence.xml

2015-11-19 Thread Markus Rathgeb
Hi Jean-Baptiste, I think you read yesterday about it (in a abstracted context). ;) That is the same background I am using in: https://issues.apache.org/jira/browse/KARAF-4124

Re: Dynamic parameters in persistence.xml

2015-11-19 Thread Jean-Baptiste Onofré
Good point Christian. However, I understood that the user wanted a "pure" persistence.xml, but if he can use the cfg properties file, clearly it's a better option. Regards JB On 11/19/2015 10:42 AM, Christian Schneider wrote: Hi, this is possible. See https://github.com/apache/aries/blob/t

Re: Dynamic parameters in persistence.xml

2015-11-19 Thread Christian Schneider
Hi, this is possible. See https://github.com/apache/aries/blob/trunk/jpa/jpa-container/src/main/java/org/apache/aries/jpa/container/impl/ManagedEMF.java#L74-L76 It registers with config admin. So you can create a config file etc/org.apache.aries.jpa..cfg. Inside you set the properties you w

Re: Features vs. Deployment Admin

2015-11-19 Thread Jean-Baptiste Onofré
Sure ;) Regards JB On 11/19/2015 10:34 AM, David Leangen wrote: Hi JB, If you don’t mind, I will send directly to you, instead of sharing on the list. :-) Cheers, =David On Nov 19, 2015, at 6:21 PM, Jean-Baptiste Onofré wrote: Hi David, can you share what you set in resourceRepositor

Re: Features vs. Deployment Admin

2015-11-19 Thread David Leangen
Hi JB, If you don’t mind, I will send directly to you, instead of sharing on the list. :-) Cheers, =David > On Nov 19, 2015, at 6:21 PM, Jean-Baptiste Onofré wrote: > > Hi David, > > can you share what you set in resourceRepositories ? > > Thanks, > Regards > JB > > On 11/19/2015 10:15

Re: Features vs. Deployment Admin

2015-11-19 Thread Guillaume Nodet
Note that the features service does not automatically react to configuration changes, so you need to restart the bundle (or karaf). If there's a problem during the loading of the repository, you should somehow see a warning in the log. 2015-11-19 10:15 GMT+01:00 David Leangen : > > Thanks, Guilla

Re: Features vs. Deployment Admin

2015-11-19 Thread Jean-Baptiste Onofré
Hi David, can you share what you set in resourceRepositories ? Thanks, Regards JB On 11/19/2015 10:15 AM, David Leangen wrote: Thanks, Guillaume! I updated the config as you suggested: Pid:org.apache.karaf.features

Re: Features vs. Deployment Admin

2015-11-19 Thread David Leangen
Thanks, Guillaume! I updated the config as you suggested: Pid:org.apache.karaf.features BundleLocation: null Properties: featuresBoot = aries-blueprint, bundle, config, deployer, diagnostic, feature, instance, jaas,

Re: Features vs. Deployment Admin

2015-11-19 Thread Guillaume Nodet
You should investigate using the FeaturesService programmatically if you need. You can ask the resolver to add requirements using featuresService.addRequirements(...) You should be able to configure to point to xml repositories. The syntax is: *resourceRepositories= [xml:url | json:url]...* S

Re: Karaf ResolveContext

2015-11-19 Thread David Leangen
Hi JB, Ok, if features does the resolving, then I don’t need the Felix resolver. thanks for clarifying. Cheers, =David > On Nov 19, 2015, at 2:38 PM, Jean-Baptiste Onofré wrote: > > Hi David, > > The Karaf Resolver is for feature, leveraging the Felix Resolver. You can > start your resol

Re: Features vs. Deployment Admin

2015-11-19 Thread David Leangen
Hi JB, Thanks again for your help. My bundle requirements are still not getting resolved, though. :-( I added this to my etc/org.apache.karaf.features.cfg file: resourcesRepositories = \ http://my.repo.com/path/to/repo/index.xml But unfortunately, Karaf still does not “see” anything provi