[ 
https://issues.apache.org/jira/browse/KARAF-161?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

james strachan resolved KARAF-161.
----------------------------------

    Resolution: Fixed

its now pretty straightforward for folks to derive from 
org.apache.karaf.shell.console.Main and create their own custom mains

> provide an easy implementation of "public static void main(String[] args)" 
> for a single command (i.e. for non-shells)
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: KARAF-161
>                 URL: https://issues.apache.org/jira/browse/KARAF-161
>             Project: Karaf
>          Issue Type: Improvement
>          Components: console
>            Reporter: james strachan
>             Fix For: 2.1.0
>
>
> Folks should be able to write a command which also has a main inside it which 
> can be invoked directly without a shell with sub commands. e.g. if I did
> {code}
> public class MyCommand extends Action { 
>   ...
>   public static void main(String[] args) {
>     SomeHelperClass.run(MyCommand.class, args);
>   }
> {code}
> then its a trivial 1 liner to turn any command into a Main as well if folks 
> want to use it in their IDE/maven/IDE, make an executable jar or whatever. 
> The same class would be reusable inside a shell too (with @Command etc)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to