What's needed to make karaf pick up a command?
Is it enough to annotate a class implementing the Action interface and
annotate it with the @Command and @Service annotations, and then load
the bundle that contains the class?
Or are there special considerations to make:
The class should not reside in a bundle that does other things commands?
The package containing the classes should be exported from the bundle?
The command classes should be mentioned in the manifest?
Should the command classes be handled specially in the karaf feature file?
I think at some point this command worked, but it is no longer available
even when the bundle that contains the command is loaded:
https://github.com/steinarb/ukelonn/blob/master/ukelonn.backend/src/main/java/no/priv/bang/ukelonn/backend/KarafReleaseLiquibaseLockCommand.java#L30
Can anyone spot what might be wrong? (I haven't done anything special
except for adding the class to a bundle that is loaded by a feature and
start a DS component)
Thanks!
Hi
Do you have the karaf service plugin in your pom ?
It's this plugin which converts annotations to services.
Take a look on the karaf-command-example.
Regards
JB
Le 25 janv. 2020 18:55, Steinar Bang <s...@dod.no> a écrit :
- What's needed to make karaf pick up a command? Steinar Bang
- Re: What's needed to make karaf pick up a comma... Francois Papon
- Re: What's needed to make karaf pick up a c... Steinar Bang
- Re: What's needed to make karaf pick up a comma... jb
- Re: What's needed to make karaf pick up a c... Paul Spencer
- Re: What's needed to make karaf pick up... Steinar Bang
- Re: What's needed to make karaf pic... Jean-Baptiste Onofré
- Re: What's needed to make kara... Paul Spencerx
- Re: What's needed to make ... Jean-Baptiste Onofre