karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "james strachan (JIRA)" <j...@apache.org>
Subject [jira] Created: (KARAF-161) provide an easy implementation of "public static void main(String[] args)" for a single command (i.e. for non-shells)
Date Tue, 24 Aug 2010 14:46:21 GMT
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.2.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.


Mime
View raw message