You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "james strachan (JIRA)" <ji...@apache.org> on 2010/08/24 16:46:21 UTC
[jira] Created: (KARAF-161) provide an easy implementation of
"public static void main(String[] args)" for a single command (i.e. for
non-shells)
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.
[jira] Resolved: (KARAF-161) provide an easy implementation of
"public static void main(String[] args)" for a single command (i.e. for
non-shells)
Posted by "james strachan (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Commented: (KARAF-161) provide an easy implementation of
"public static void main(String[] args)" for a single command (i.e. for
non-shells)
Posted by "Jamie goodyear (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/KARAF-161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12909363#action_12909363 ]
Jamie goodyear commented on KARAF-161:
--------------------------------------
Hi James, any update on this issue? We're discussing cutting a Karaf 2.1.0 release soon and I'd like to know if this issue may be worked on / resolved soon, otherwise we may push this one out to 2.2.0. Thanks :)
> 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.