I need to create a very simple console command to provide a way to forcibly unlock a liquibase changelog lock (can be left in place as locked if the liquibase update code crashes during a changelog update).
However I have a hard time figuring out how to do this. The descriptions that google digs up are very much out of date. https://karaf.apache.org/manual/latest-2.x/developers-guide/extending-console.html http://icodebythesea.blogspot.no/2011/11/creating-your-own-apache-karaf-console.html The classes these documents refer to have changed their package names, have been deprecated for the last 3 years, as a fix for this issue: https://issues.apache.org/jira/browse/KARAF-2805 What I would have liked to do, was to register an OSGi service and have karaf pick it up. But that sounds like the whiteboarding pattern and that ended up as a won't fix: https://issues.apache.org/jira/browse/KARAF-2762 Is the current way, the following? 1. Create a class that implements the interface org.apache.karaf.shell.api.action.Action 2. Add a @Service annotation to the class 3. Karaf will find an instantiate this class (If so, then that's not ideal, because then that action class will need to use some kind of singleton to get to the OSGi services it needs...) Thanks! - Steinar
