Hi Steinar, I think you have to add the karaf-services-maven-plugin in your build:
https://github.com/apache/karaf/blob/2bc547f5e1a8a681333d40aa291ac3cf615c1d2f/examples/karaf-command-example/karaf-command-example-command/pom.xml#L51 regards, François [email protected] Le 25/01/2020 à 18:55, Steinar Bang a écrit : > 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! >
