-
1. Re: [forge-users] How do I run Forge shell from the code ?
gastaldi Feb 16, 2014 5:43 PM (in response to Antonio Goncalves )Hi Antonio,
There are two options:
- I usually build the whole project (tests disabled), then go into dist/target and unzip the distribution. After that I remove my ~/.forge and install the core with forge -i org.jboss.forge.addon:core,2.0.1-SNAPSHOT -b.
- create tests using the shell-test-harness.
There is a sh script in the forge/core root that does the unzipping but I usually do it manually.
Em 16/02/2014, às 17:48, Antonio Goncalves <antonio.mailing@gmail.com> escreveu:
Hi developers,
I've cloned Forge 2 code on my local computer, I create pull/requests, test new functionalities.... But do you know how I actually run the command shell from the code ?
If I run the org.jboss.forge.bootstrap.Bootstrap class (it has a public static void main method) the output just hangs (like when the Shell is not installed) :
JBoss Forge, version - JBoss, by Red Hat, Inc. http://forge.jboss.org
So I thought of passing this argument to the Bootstrap class (--install org.jboss.forge.addon:core,2.0.1-SNAPSHOT) but there is a NPE at :
String result = System.console().readLine("Confirm installation ? ");
So on debug mode I set the result to "Y" but after bootstrap.start(); the VM just stopped gently.
I suppose the underlying question is : how do you run the shell once you have made a change and want to test it ?
Antonio
_______________________________________________
forge-users mailing list
-
att1.html.zip 1.3 KB
-
-
2. Re: [forge-users] How do I run Forge shell from the code ?
Well, I also do the entire "remove my ~/.forge and install the core with
forge -i org.jboss.forge.addon:core,2.0.1-SNAPSHOT -b"... but I thought
there was something easier. So, from my IDE I cannot run a Main class
somewhere that kick off Forge locally (without having to istall it) ?
2014-02-16 23:43 GMT+01:00 George Gastaldi <ggastald@redhat.com>:
Hi Antonio,
There are two options:
- I usually build the whole project (tests disabled), then go into
dist/target and unzip the distribution. After that I remove my ~/.forge and
install the core with forge -i org.jboss.forge.addon:core,2.0.1-SNAPSHOT
-b.
- create tests using the shell-test-harness.
There is a sh script in the forge/core root that does the unzipping but I
usually do it manually.
Em 16/02/2014, às 17:48, Antonio Goncalves <antonio.mailing@gmail.com>
escreveu:
Hi developers,
I've cloned Forge 2 code on my local computer, I create pull/requests,
test new functionalities.... But do you know how I actually run the command
shell from the code ?
If I run the org.jboss.forge.bootstrap.Bootstrap class (it has a *public
static void *main method) the output just hangs (like when the Shell is
not installed) :
JBoss Forge, version - JBoss, by Red Hat, Inc. [
So I thought of passing this argument to the Bootstrap class (--install
org.jboss.forge.addon:core,2.0.1-SNAPSHOT) but there is a NPE at :
String result = System.console().readLine(*"Confirm installation ?
"*);
So on debug mode I set the result to "Y" but after bootstrap.start(); the
VM just stopped gently.
I suppose the underlying question is : how do you run the shell once you
have made a change and want to test it ?
Antonio
_______________________________________________
forge-users mailing list
https://lists.jboss.org/mailman/listinfo/forge-users
>
_______________________________________________
forge-users mailing list
https://lists.jboss.org/mailman/listinfo/forge-users
--
Antonio Goncalves
Software architect and Java Champion
Web site <http://www.antoniogoncalves.org/> |
Twitter<http://twitter.com/agoncal>
| LinkedIn <http://www.linkedin.com/in/agoncal> | Paris
| Devoxx France <http://www.devoxx.fr/>
-
3. Re: [forge-users] How do I run Forge shell from the code ?
gastaldi Feb 17, 2014 7:05 AM (in response to Antonio Goncalves )I beliee the problem is that the default Console tab in Eclipse does not handle System.in very well (Tabs, etc). Koen is working in the Forge 2 Console view and should allow this very soon.
Em 17/02/2014, às 08:10, Antonio Goncalves <antonio.mailing@gmail.com> escreveu:
Well, I also do the entire "remove my ~/.forge and install the core with forge -i org.jboss.forge.addon:core,2.0.1-SNAPSHOT -b"... but I thought there was something easier. So, from my IDE I cannot run a Main class somewhere that kick off Forge locally (without having to istall it) ?
2014-02-16 23:43 GMT+01:00 George Gastaldi <ggastald@redhat.com>:
>> Hi Antonio,
>>
>> There are two options:
>>
>> - I usually build the whole project (tests disabled), then go into dist/target and unzip the distribution. After that I remove my ~/.forge and install the core with forge -i org.jboss.forge.addon:core,2.0.1-SNAPSHOT -b.
>>
>> - create tests using the shell-test-harness.
>>
>> There is a sh script in the forge/core root that does the unzipping but I usually do it manually.
>>
>>> Em 16/02/2014, às 17:48, Antonio Goncalves <antonio.mailing@gmail.com> escreveu:
>>>
>>
>>> Hi developers,
>>>
>>> I've cloned Forge 2 code on my local computer, I create pull/requests, test new functionalities.... But do you know how I actually run the command shell from the code ?
>>>
>>> If I run the org.jboss.forge.bootstrap.Bootstrap class (it has a public static void main method) the output just hangs (like when the Shell is not installed) :
>>>
>>> JBoss Forge, version - JBoss, by Red Hat, Inc. http://forge.jboss.org
>>>
>>> So I thought of passing this argument to the Bootstrap class (--install org.jboss.forge.addon:core,2.0.1-SNAPSHOT) but there is a NPE at :
>>>
>>> String result = System.console().readLine("Confirm installation ? ");
>>>
>>> So on debug mode I set the result to "Y" but after bootstrap.start(); the VM just stopped gently.
>>>
>>> I suppose the underlying question is : how do you run the shell once you have made a change and want to test it ?
>>>
>>> Antonio
>>> _______________________________________________
>>> forge-users mailing list
>>> forge-users@lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/forge-users
>>
>> _______________________________________________
>> forge-users mailing list
>> forge-users@lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/forge-users
--
Antonio Goncalves
Software architect and Java Champion
Web site | Twitter | LinkedIn | Paris JUG | Devoxx France
_______________________________________________
forge-users mailing list
-
att1.html.zip 1.9 KB
-
-
4. Re: [forge-users] How do I run Forge shell from the code ?
lincolnthree Feb 17, 2014 8:57 AM (in response to gastaldi)Antonio, if I understand you correctly, you want to be able to run the
Forge shell via the Forge sources in the IDE. Unfortunately there's not
really a way to do that currently since as George says, the IDE terminals
basically can't handle TAB characters or backspace very well.
Though this does give me the idea that we should really provide this as a
feature somehow if possible. Maybe as a "Run" type. "Run in Forge Console",
so that you could try out any application in the Forge terminal. This would
obviously let you run Forge sources as well (E.g. Running the Bootstrap
class in the Forge Console would give you the same result as running the
Forge Console and starting Forge via the green button.
Koen, is this something you think we can do at some point?
On Mon, Feb 17, 2014 at 7:05 AM, George Gastaldi <ggastald@redhat.com>wrote:
I beliee the problem is that the default Console tab in Eclipse does not
handle System.in very well (Tabs, etc). Koen is working in the Forge 2
Console view and should allow this very soon.
Em 17/02/2014, às 08:10, Antonio Goncalves <antonio.mailing@gmail.com>
escreveu:
Well, I also do the entire "remove my ~/.forge and install the core with
forge -i org.jboss.forge.addon:core,2.0.1-SNAPSHOT -b"... but I thought
there was something easier. So, from my IDE I cannot run a Main class
somewhere that kick off Forge locally (without having to istall it) ?
>
2014-02-16 23:43 GMT+01:00 George Gastaldi <ggastald@redhat.com>:
>> Hi Antonio,
>>
>> There are two options:
>>
>> - I usually build the whole project (tests disabled), then go into
>> dist/target and unzip the distribution. After that I remove my ~/.forge and
>> install the core with forge -i org.jboss.forge.addon:core,2.0.1-SNAPSHOT
>> -b.
>>
>> - create tests using the shell-test-harness.
>>
>> There is a sh script in the forge/core root that does the unzipping but I
>> usually do it manually.
>>
>> Em 16/02/2014, às 17:48, Antonio Goncalves <antonio.mailing@gmail.com>
>> escreveu:
>>
>> Hi developers,
>>
>> I've cloned Forge 2 code on my local computer, I create pull/requests,
>> test new functionalities.... But do you know how I actually run the command
>> shell from the code ?
>>
>> If I run the org.jboss.forge.bootstrap.Bootstrap class (it has a *public
>> static void *main method) the output just hangs (like when the Shell is
>> not installed) :
>>
>> JBoss Forge, version - JBoss, by Red Hat, Inc. [
>>
>> So I thought of passing this argument to the Bootstrap class (--install
>> org.jboss.forge.addon:core,2.0.1-SNAPSHOT) but there is a NPE at :
>>
>> String result = System.console().readLine(*"Confirm installation
>>
>> So on debug mode I set the result to "Y" but after bootstrap.start();the VM just stopped gently.
>> I suppose the underlying question is : how do you run the shell once you
>> have made a change and want to test it ?
>>
>> Antonio
>>
>> _______________________________________________
>> forge-users mailing list
>> forge-users@lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/forge-users
>>
>>
>> _______________________________________________
>> forge-users mailing list
>> forge-users@lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/forge-users
>>
>
>
--
Antonio Goncalves
Software architect and Java Champion
Web site <http://www.antoniogoncalves.org/> | Twitter<http://twitter.com/agoncal>
| LinkedIn <http://www.linkedin.com/in/agoncal> | Paris JUG<http://www.parisjug.org/>
| Devoxx France <http://www.devoxx.fr/>
_______________________________________________
forge-users mailing list
https://lists.jboss.org/mailman/listinfo/forge-users
>
_______________________________________________
forge-users mailing list
https://lists.jboss.org/mailman/listinfo/forge-users
--
Lincoln Baxter, III
"Simpler is better."
-
att1.html.zip 2.3 KB
-
-
5. Re: [forge-users] How do I run Forge shell from the code ?
Yes, that's what I would like to do. Doesn't really matter if I don't have
the full shell support (like TAB and so on). I'm quite interested in the
code generation, so if I make a tiny change in a template and want to
quickly have a look at what it generates, I would like to run the Shell
inside my IDE, quickly enter 2 or 3 shell commands and see if my changes
are ok.
2014-02-17 14:57 GMT+01:00 Lincoln Baxter, III <lincolnbaxter@gmail.com>:
Antonio, if I understand you correctly, you want to be able to run the
Forge shell via the Forge sources in the IDE. Unfortunately there's not
really a way to do that currently since as George says, the IDE terminals
basically can't handle TAB characters or backspace very well.
Though this does give me the idea that we should really provide this as a
feature somehow if possible. Maybe as a "Run" type. "Run in Forge Console",
so that you could try out any application in the Forge terminal. This would
obviously let you run Forge sources as well (E.g. Running the Bootstrap
class in the Forge Console would give you the same result as running the
Forge Console and starting Forge via the green button.
Koen, is this something you think we can do at some point?
>
On Mon, Feb 17, 2014 at 7:05 AM, George Gastaldi <ggastald@redhat.com>wrote:
>> I beliee the problem is that the default Console tab in Eclipse does not
>> handle System.in very well (Tabs, etc). Koen is working in the Forge 2
>> Console view and should allow this very soon.
>>
>> Em 17/02/2014, às 08:10, Antonio Goncalves <antonio.mailing@gmail.com>
>> escreveu:
>>
>> Well, I also do the entire "remove my ~/.forge and install the core with
>> forge -i org.jboss.forge.addon:core,2.0.1-SNAPSHOT -b"... but I thought
>> there was something easier. So, from my IDE I cannot run a Main class
>> somewhere that kick off Forge locally (without having to istall it) ?
>>
>>
>> 2014-02-16 23:43 GMT+01:00 George Gastaldi <ggastald@redhat.com>:
>>
>>> Hi Antonio,
>>>
>>> There are two options:
>>>
>>> - I usually build the whole project (tests disabled), then go into
>>> dist/target and unzip the distribution. After that I remove my ~/.forge and
>>> install the core with forge -i org.jboss.forge.addon:core,2.0.1-SNAPSHOT
>>> -b.
>>>
>>> - create tests using the shell-test-harness.
>>>
>>> There is a sh script in the forge/core root that does the unzipping but
>>> I usually do it manually.
>>>
>>> Em 16/02/2014, às 17:48, Antonio Goncalves <antonio.mailing@gmail.com>
>>> escreveu:
>>>
>>> Hi developers,
>>>
>>> I've cloned Forge 2 code on my local computer, I create pull/requests,
>>> test new functionalities.... But do you know how I actually run the command
>>> shell from the code ?
>>>
>>> If I run the org.jboss.forge.bootstrap.Bootstrap class (it has a *public
>>> static void *main method) the output just hangs (like when the Shell is
>>> not installed) :
>>>
>>> JBoss Forge, version - JBoss, by Red Hat, Inc. [
>>> http://forge.jboss.org ]
>>>
>>> So I thought of passing this argument to the Bootstrap class (--install
>>> org.jboss.forge.addon:core,2.0.1-SNAPSHOT) but there is a NPE at :
>>>
>>> String result = System.console().readLine(*"Confirm installation
>>>
>>> So on debug mode I set the result to "Y" but after bootstrap.start();the VM just stopped gently.
>>> I suppose the underlying question is : how do you run the shell once you
>>> have made a change and want to test it ?
>>>
>>> Antonio
>>>
>>> _______________________________________________
>>> forge-users mailing list
>>> forge-users@lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/forge-users
>>>
>>>
>>> _______________________________________________
>>> forge-users mailing list
>>> forge-users@lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/forge-users
>>>
>>
>>
>>
>> --
>> Antonio Goncalves
>> Software architect and Java Champion
>>
>> Web site <http://www.antoniogoncalves.org/> | Twitter<http://twitter.com/agoncal>
>> | LinkedIn <http://www.linkedin.com/in/agoncal> | Paris JUG<http://www.parisjug.org/>
>> | Devoxx France <http://www.devoxx.fr/>
>>
>> _______________________________________________
>> forge-users mailing list
>> forge-users@lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/forge-users
>>
>>
>> _______________________________________________
>> forge-users mailing list
>> forge-users@lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/forge-users
>>
>
>
--
Lincoln Baxter, III
"Simpler is better."
_______________________________________________
forge-users mailing list
https://lists.jboss.org/mailman/listinfo/forge-users
--
Antonio Goncalves
Software architect and Java Champion
Web site <http://www.antoniogoncalves.org/> |
Twitter<http://twitter.com/agoncal>
| LinkedIn <http://www.linkedin.com/in/agoncal> | Paris
| Devoxx France <http://www.devoxx.fr/>
-
6. Re: [forge-users] How do I run Forge shell from the code ?
lincolnthree Feb 17, 2014 9:40 AM (in response to Antonio Goncalves )In this case, I suggest writing a test case:
On Mon, Feb 17, 2014 at 9:25 AM, Antonio Goncalves <
antonio.mailing@gmail.com> wrote:
Yes, that's what I would like to do. Doesn't really matter if I don't have
the full shell support (like TAB and so on). I'm quite interested in the
code generation, so if I make a tiny change in a template and want to
quickly have a look at what it generates, I would like to run the Shell
inside my IDE, quickly enter 2 or 3 shell commands and see if my changes
are ok.
>
2014-02-17 14:57 GMT+01:00 Lincoln Baxter, III <lincolnbaxter@gmail.com>:
Antonio, if I understand you correctly, you want to be able to run the
>> Forge shell via the Forge sources in the IDE. Unfortunately there's not
>> really a way to do that currently since as George says, the IDE terminals
>> basically can't handle TAB characters or backspace very well.
>>
>> Though this does give me the idea that we should really provide this as a
>> feature somehow if possible. Maybe as a "Run" type. "Run in Forge Console",
>> so that you could try out any application in the Forge terminal. This would
>> obviously let you run Forge sources as well (E.g. Running the Bootstrap
>> class in the Forge Console would give you the same result as running the
>> Forge Console and starting Forge via the green button.
>>
>> Koen, is this something you think we can do at some point?
>>
>>
>> On Mon, Feb 17, 2014 at 7:05 AM, George Gastaldi <ggastald@redhat.com>wrote:
>>
>>> I beliee the problem is that the default Console tab in Eclipse does not
>>> handle System.in very well (Tabs, etc). Koen is working in the Forge 2
>>> Console view and should allow this very soon.
>>>
>>> Em 17/02/2014, às 08:10, Antonio Goncalves <antonio.mailing@gmail.com>
>>> escreveu:
>>>
>>> Well, I also do the entire "remove my ~/.forge and install the core with
>>> forge -i org.jboss.forge.addon:core,2.0.1-SNAPSHOT -b"... but I thought
>>> there was something easier. So, from my IDE I cannot run a Main class
>>> somewhere that kick off Forge locally (without having to istall it) ?
>>>
>>>
>>> 2014-02-16 23:43 GMT+01:00 George Gastaldi <ggastald@redhat.com>:
>>>
>>>> Hi Antonio,
>>>>
>>>> There are two options:
>>>>
>>>> - I usually build the whole project (tests disabled), then go into
>>>> dist/target and unzip the distribution. After that I remove my ~/.forge and
>>>> install the core with forge -i org.jboss.forge.addon:core,2.0.1-SNAPSHOT
>>>> -b.
>>>>
>>>> - create tests using the shell-test-harness.
>>>>
>>>> There is a sh script in the forge/core root that does the unzipping but
>>>> I usually do it manually.
>>>>
>>>> Em 16/02/2014, às 17:48, Antonio Goncalves <antonio.mailing@gmail.com>
>>>> escreveu:
>>>>
>>>> Hi developers,
>>>>
>>>> I've cloned Forge 2 code on my local computer, I create pull/requests,
>>>> test new functionalities.... But do you know how I actually run the command
>>>> shell from the code ?
>>>>
>>>> If I run the org.jboss.forge.bootstrap.Bootstrap class (it has a *public
>>>> static void *main method) the output just hangs (like when the Shell
>>>> is not installed) :
>>>>
>>>> JBoss Forge, version - JBoss, by Red Hat, Inc. [
>>>> http://forge.jboss.org ]
>>>>
>>>> So I thought of passing this argument to the Bootstrap class (--install
>>>> org.jboss.forge.addon:core,2.0.1-SNAPSHOT) but there is a NPE at :
>>>>
>>>> String result = System.console().readLine(*"Confirm installation
>>>>
>>>> So on debug mode I set the result to "Y" but after bootstrap.start();the VM just stopped gently.
>>>> I suppose the underlying question is : how do you run the shell once
>>>> you have made a change and want to test it ?
>>>>
>>>> Antonio
>>>>
>>>> _______________________________________________
>>>> forge-users mailing list
>>>> forge-users@lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/forge-users
>>>>
>>>>
>>>> _______________________________________________
>>>> forge-users mailing list
>>>> forge-users@lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/forge-users
>>>>
>>>
>>>
>>>
>>> --
>>> Antonio Goncalves
>>> Software architect and Java Champion
>>>
>>> Web site <http://www.antoniogoncalves.org/> | Twitter<http://twitter.com/agoncal>
>>> | LinkedIn <http://www.linkedin.com/in/agoncal> | Paris JUG<http://www.parisjug.org/>
>>> | Devoxx France <http://www.devoxx.fr/>
>>>
>>> _______________________________________________
>>> forge-users mailing list
>>> forge-users@lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/forge-users
>>>
>>>
>>> _______________________________________________
>>> forge-users mailing list
>>> forge-users@lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/forge-users
>>>
>>
>>
>>
>> --
>> Lincoln Baxter, III
>> "Simpler is better."
>>
>> _______________________________________________
>> forge-users mailing list
>> forge-users@lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/forge-users
>>
>
>
--
Antonio Goncalves
Software architect and Java Champion
Web site <http://www.antoniogoncalves.org/> | Twitter<http://twitter.com/agoncal>
| LinkedIn <http://www.linkedin.com/in/agoncal> | Paris JUG<http://www.parisjug.org/>
| Devoxx France <http://www.devoxx.fr/>
_______________________________________________
forge-users mailing list
https://lists.jboss.org/mailman/listinfo/forge-users
--
Lincoln Baxter, III
"Simpler is better."
-
att1.html.zip 2.7 KB
-
-
7. Re: [forge-users] How do I run Forge shell from the code ?
lincolnthree Feb 17, 2014 9:40 AM (in response to lincolnthree)In fact, that test case should pretty much be set up for what you need. I
would just copy this as a starting point, replace the test methods with
your own, and go from there.
On Mon, Feb 17, 2014 at 9:40 AM, Lincoln Baxter, III <
lincolnbaxter@gmail.com> wrote:
In this case, I suggest writing a test case:
>
On Mon, Feb 17, 2014 at 9:25 AM, Antonio Goncalves <
antonio.mailing@gmail.com> wrote:
>> Yes, that's what I would like to do. Doesn't really matter if I don't
>> have the full shell support (like TAB and so on). I'm quite interested in
>> the code generation, so if I make a tiny change in a template and want to
>> quickly have a look at what it generates, I would like to run the Shell
>> inside my IDE, quickly enter 2 or 3 shell commands and see if my changes
>> are ok.
>>
>>
>> 2014-02-17 14:57 GMT+01:00 Lincoln Baxter, III <lincolnbaxter@gmail.com>:
>>
>> Antonio, if I understand you correctly, you want to be able to run the
>>> Forge shell via the Forge sources in the IDE. Unfortunately there's not
>>> really a way to do that currently since as George says, the IDE terminals
>>> basically can't handle TAB characters or backspace very well.
>>>
>>> Though this does give me the idea that we should really provide this as
>>> a feature somehow if possible. Maybe as a "Run" type. "Run in Forge
>>> Console", so that you could try out any application in the Forge terminal.
>>> This would obviously let you run Forge sources as well (E.g. Running the
>>> Bootstrap class in the Forge Console would give you the same result as
>>> running the Forge Console and starting Forge via the green button.
>>>
>>> Koen, is this something you think we can do at some point?
>>>
>>>
>>> On Mon, Feb 17, 2014 at 7:05 AM, George Gastaldi <ggastald@redhat.com>wrote:
>>>
>>>> I beliee the problem is that the default Console tab in Eclipse does
>>>> not handle System.in very well (Tabs, etc). Koen is working in the Forge 2
>>>> Console view and should allow this very soon.
>>>>
>>>> Em 17/02/2014, às 08:10, Antonio Goncalves <antonio.mailing@gmail.com>
>>>> escreveu:
>>>>
>>>> Well, I also do the entire "remove my ~/.forge and install the core
>>>> with forge -i org.jboss.forge.addon:core,2.0.1-SNAPSHOT -b"... but I
>>>> thought there was something easier. So, from my IDE I cannot run a Main
>>>> class somewhere that kick off Forge locally (without having to istall it) ?
>>>>
>>>>
>>>> 2014-02-16 23:43 GMT+01:00 George Gastaldi <ggastald@redhat.com>:
>>>>
>>>>> Hi Antonio,
>>>>>
>>>>> There are two options:
>>>>>
>>>>> - I usually build the whole project (tests disabled), then go into
>>>>> dist/target and unzip the distribution. After that I remove my ~/.forge and
>>>>> install the core with forge -i org.jboss.forge.addon:core,2.0.1-SNAPSHOT
>>>>> -b.
>>>>>
>>>>> - create tests using the shell-test-harness.
>>>>>
>>>>> There is a sh script in the forge/core root that does the unzipping
>>>>> but I usually do it manually.
>>>>>
>>>>> Em 16/02/2014, às 17:48, Antonio Goncalves <antonio.mailing@gmail.com>
>>>>> escreveu:
>>>>>
>>>>> Hi developers,
>>>>>
>>>>> I've cloned Forge 2 code on my local computer, I create pull/requests,
>>>>> test new functionalities.... But do you know how I actually run the command
>>>>> shell from the code ?
>>>>>
>>>>> If I run the org.jboss.forge.bootstrap.Bootstrap class (it has a *public
>>>>> static void *main method) the output just hangs (like when the Shell
>>>>> is not installed) :
>>>>>
>>>>> JBoss Forge, version - JBoss, by Red Hat, Inc. [
>>>>> http://forge.jboss.org ]
>>>>>
>>>>> So I thought of passing this argument to the Bootstrap class
>>>>> (--install org.jboss.forge.addon:core,2.0.1-SNAPSHOT) but there is a NPE at
>>>>> :
>>>>>
>>>>> String result = System.console().readLine(*"Confirm installation
>>>>>
>>>>> So on debug mode I set the result to "Y" but after bootstrap.start();the VM just stopped gently.
>>>>> I suppose the underlying question is : how do you run the shell once
>>>>> you have made a change and want to test it ?
>>>>>
>>>>> Antonio
>>>>>
>>>>> _______________________________________________
>>>>> forge-users mailing list
>>>>> forge-users@lists.jboss.org
>>>>> https://lists.jboss.org/mailman/listinfo/forge-users
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> forge-users mailing list
>>>>> forge-users@lists.jboss.org
>>>>> https://lists.jboss.org/mailman/listinfo/forge-users
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Antonio Goncalves
>>>> Software architect and Java Champion
>>>>
>>>> Web site <http://www.antoniogoncalves.org/> | Twitter<http://twitter.com/agoncal>
>>>> | LinkedIn <http://www.linkedin.com/in/agoncal> | Paris JUG<http://www.parisjug.org/>
>>>> | Devoxx France <http://www.devoxx.fr/>
>>>>
>>>> _______________________________________________
>>>> forge-users mailing list
>>>> forge-users@lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/forge-users
>>>>
>>>>
>>>> _______________________________________________
>>>> forge-users mailing list
>>>> forge-users@lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/forge-users
>>>>
>>>
>>>
>>>
>>> --
>>> Lincoln Baxter, III
>>> "Simpler is better."
>>>
>>> _______________________________________________
>>> forge-users mailing list
>>> forge-users@lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/forge-users
>>>
>>
>>
>>
>> --
>> Antonio Goncalves
>> Software architect and Java Champion
>>
>> Web site <http://www.antoniogoncalves.org/> | Twitter<http://twitter.com/agoncal>
>> | LinkedIn <http://www.linkedin.com/in/agoncal> | Paris JUG<http://www.parisjug.org/>
>> | Devoxx France <http://www.devoxx.fr/>
>>
>> _______________________________________________
>> forge-users mailing list
>> forge-users@lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/forge-users
>>
>
>
--
Lincoln Baxter, III
"Simpler is better."
--
Lincoln Baxter, III
"Simpler is better."
-
att1.html.zip 2.8 KB
-
-
8. Re: [forge-users] How do I run Forge shell from the code ?
koen.aers Feb 17, 2014 10:17 AM (in response to lincolnthree)It's software… With the correct amount of indirections, everything is possible
But I think it should probably be not too difficult.
Cheers,
Koen
Op 17-feb.-2014, om 14:57 heeft Lincoln Baxter, III het volgende geschreven:
Antonio, if I understand you correctly, you want to be able to run the Forge shell via the Forge sources in the IDE. Unfortunately there's not really a way to do that currently since as George says, the IDE terminals basically can't handle TAB characters or backspace very well.
Though this does give me the idea that we should really provide this as a feature somehow if possible. Maybe as a "Run" type. "Run in Forge Console", so that you could try out any application in the Forge terminal. This would obviously let you run Forge sources as well (E.g. Running the Bootstrap class in the Forge Console would give you the same result as running the Forge Console and starting Forge via the green button.
Koen, is this something you think we can do at some point?
On Mon, Feb 17, 2014 at 7:05 AM, George Gastaldi <ggastald@redhat.com> wrote:
I beliee the problem is that the default Console tab in Eclipse does not handle System.in very well (Tabs, etc). Koen is working in the Forge 2 Console view and should allow this very soon.
Em 17/02/2014, às 08:10, Antonio Goncalves <antonio.mailing@gmail.com> escreveu:
>> Well, I also do the entire "remove my ~/.forge and install the core with forge -i org.jboss.forge.addon:core,2.0.1-SNAPSHOT -b"... but I thought there was something easier. So, from my IDE I cannot run a Main class somewhere that kick off Forge locally (without having to istall it) ?
>>
>>
>> 2014-02-16 23:43 GMT+01:00 George Gastaldi <ggastald@redhat.com>:
>> Hi Antonio,
>>
>> There are two options:
>>
>> - I usually build the whole project (tests disabled), then go into dist/target and unzip the distribution. After that I remove my ~/.forge and install the core with forge -i org.jboss.forge.addon:core,2.0.1-SNAPSHOT -b.
>>
>> - create tests using the shell-test-harness.
>>
>> There is a sh script in the forge/core root that does the unzipping but I usually do it manually.
>>
>> Em 16/02/2014, às 17:48, Antonio Goncalves <antonio.mailing@gmail.com> escreveu:
>>
>>> Hi developers,
>>>
>>> I've cloned Forge 2 code on my local computer, I create pull/requests, test new functionalities.... But do you know how I actually run the command shell from the code ?
>>>
>>> If I run the org.jboss.forge.bootstrap.Bootstrap class (it has a public static void main method) the output just hangs (like when the Shell is not installed) :
>>>
>>> JBoss Forge, version - JBoss, by Red Hat, Inc. http://forge.jboss.org
>>>
>>> So I thought of passing this argument to the Bootstrap class (--install org.jboss.forge.addon:core,2.0.1-SNAPSHOT) but there is a NPE at :
>>>
>>> String result = System.console().readLine("Confirm installation ? ");
>>>
>>> So on debug mode I set the result to "Y" but after bootstrap.start(); the VM just stopped gently.
>>>
>>> I suppose the underlying question is : how do you run the shell once you have made a change and want to test it ?
>>>
>>> Antonio
>>> _______________________________________________
>>> forge-users mailing list
>>> forge-users@lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/forge-users
>>
>> _______________________________________________
>> forge-users mailing list
>> forge-users@lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/forge-users
>>
>>
>>
>> --
>> Antonio Goncalves
>> Software architect and Java Champion
>>
>> Web site | Twitter | LinkedIn | Paris JUG | Devoxx France
>> _______________________________________________
>> forge-users mailing list
>> forge-users@lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/forge-users
_______________________________________________
forge-users mailing list
https://lists.jboss.org/mailman/listinfo/forge-users
--
Lincoln Baxter, III
"Simpler is better."
_______________________________________________
forge-users mailing list
-
att1.html.zip 2.5 KB
-