Re: Update the map on change .cfg file on Karaf

2017-07-17 Thread Dominik Marciniszyn
Thank you, I've used this method and it works good for one file. But I saw If
I would like to handle multiple .cfg files there is a problem. I found an
example of using updated callback function. To do this I need to first
register service and then I can use this method. But in case of many files I
cannot do this. Is there other way to achieve this?



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Update-the-map-on-change-cfg-file-on-Karaf-tp4051008p4051024.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.


Update the map on change .cfg file on Karaf

2017-07-14 Thread Dominik Marciniszyn
Hi,
I have defined map based on values from my .cfg file on Karaf. In java code
I use ConfigurationAdmin and Configuration to fill the map. I would like to
update my map when .cfg file was modified but without restaring bundle. Is
it possible to do? 

Thank you for any advice,
Dominik Marciniszyn



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Update-the-map-on-change-cfg-file-on-Karaf-tp4051008.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.


Import-Export property files between modules

2017-07-25 Thread Dominik Marciniszyn
Hi,

I have a few modules and each of them have its own property file in
src/main/resources. I would like to export these files from each bundle and
import them in one module. The module should create one file from this
files. (Each file has the same name). Can I do it by ,
 in maven-bundle-plugin? I have problem with import these
files into one bundle.

Thanks for any help or advice,
Dominik Marciniszyn



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Import-Export-property-files-between-modules-tp4051092.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.


Re: Import-Export property files between modules

2017-07-25 Thread Dominik Marciniszyn
By export I mean to get the resource in target/classes after build by maven.
I use  tag to extract my property file from bundle and now
I would like to put them into one bundle by using  or
something else if it is possible.



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Import-Export-property-files-between-modules-tp4051092p4051094.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.


Recognise commands in completer class

2017-05-18 Thread Dominik Marciniszyn
Hi,

I would like to create one Completer class which will be able to recognise
which command was given by user and I would like to print completion depends
on command.

Is it possible or is example how to do this?

Thank You for any help



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Recognise-commands-in-completer-class-tp4050383.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.


Error executing command on bundle

2017-06-09 Thread Dominik Marciniszyn
Hi,

I've added to my pom.xml dependency "org.apache.commons.beanutils". When I
build project, everything was ok, but after update module on karaf I've got
an error:
  Unable to resolve my-osgi, missing requirement osgi.wiring.package,
osgi.wiring.package=org.apache.commons.beanutils.

I've tried to resolve this, but I'm stuck. I'm using
org.apache.commons.beanutils in version 1.8.3_2.

I'll be glad for any advice or help,
Dominik Marciniszyn



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Error-executing-command-on-bundle-tp4050630.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.


Getting resources from other OSGi Bundle

2017-06-22 Thread Dominik Marciniszyn
Hi,

I have two osgi bundles and I would like to get some resources files from
one bundle to another. I've used BundleContext to get the second bundle by
ID. Then I use getResource() method, pass the path parameter but always got
null.

Sample code I used:
BundleContext context =
FrameworkUtil.getBundle(MyClass.class).getBundleContext();
context.getBundle(id_of_my_second_bundle).getResource("resource/res_file");

Thank you for any advices or help,
Dominik Marciniszyn



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Getting-resources-from-other-OSGi-Bundle-tp4050852.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.


Own Karaf commands customization

2017-05-30 Thread Dominik Marciniszyn
Hi,

I would like to customize commands created by myself. Some of this commands
returns a lot of information. So I have two questions:

1. How could I creating custom coloring of my commands?
2. How could I create limitations of displaying results on the console? I
would like do mechanism like in Karaf shell - "karaf@root()> Display all 294
possibilities? (y or n)"

Thank You for help or advice,
Dominik Marciniszyn



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Own-Karaf-commands-customization-tp4050498.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.