[JBoss JIRA] (FORGE-1860) Writing files with content
by Robert Balent (JIRA)
[ https://issues.jboss.org/browse/FORGE-1860?page=com.atlassian.jira.plugin... ]
Robert Balent reassigned FORGE-1860:
------------------------------------
Assignee: Robert Balent
> Writing files with content
> --------------------------
>
> Key: FORGE-1860
> URL: https://issues.jboss.org/browse/FORGE-1860
> Project: Forge
> Issue Type: Feature Request
> Components: UI - Shell
> Affects Versions: 2.6.0.Final
> Reporter: Antonio Goncalves
> Assignee: Robert Balent
> Fix For: 2.x Future
>
>
> I see myself adding files here and there on my projects (JBoss cli commands, shell scripts, SQL scripts...) and I use the touch command in Forge extensively. But how could I add content to these files ? I mostly write Forge scripts, so I would love to do something like that in my script :
> {code}
> # Creates a project
> project-new --named test
> # Adds a few extra files and directories
> mkdir src/main/script ;
> touch src/main/resources/insert.sql ; // This creates an empty file
> touch src/main/script/wildfly-show.cli --content (((( // This adds content to the file
> version
> # ####################
> # # System Properties
> # ####################
> /core-service=platform-mbean/type=runtime:read-attribute(name=system-properties)
> # ####################
> # # Datasource
> # ####################
> /subsystem=datasources/data-source=ApplicationBlancheH2DS:read-resource
> ))))
> {code}
> And this command would just create a file with the previous content in it. As you can see, this can be tricky : when to end the content of a file (something similar to <![CDATA[]]>)
> George mentioned on the mailing list :
> ??I think piping to a file would be more intuitive and it should work now:??
> {code}
> echo Hi > a.txt
> {code}
> The problem with this, is I can't make it work the way I want. In fact, each time I do a {{echo text > file.txt}}, the {{file.txt}} is created in the directory below, not the current one. As I can't create a file in another directory.
> {code}
> [Devoxx]$ ls
> [Devoxx]$ project-new --named testecho
> ***SUCCESS*** Project named 'testecho' has been created.
> [testecho]$ ls
> pom.xml src
> [testecho]$ echo Text to add to this new file > newfile.txt
> [testecho]$ ls
> pom.xml src
> [testecho]$ cd ..
> [Devoxx]$ ls
> newfile.txt testecho
> [Devoxx]$
> [testecho]$ echo One test again > ./file.txt
> [testecho]$ ls
> pom.xml src
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 6 months
[JBoss JIRA] (FORGE-1861) Having a cp command like in Forge 1.x
by Antonio Goncalves (JIRA)
Antonio Goncalves created FORGE-1861:
----------------------------------------
Summary: Having a cp command like in Forge 1.x
Key: FORGE-1861
URL: https://issues.jboss.org/browse/FORGE-1861
Project: Forge
Issue Type: Feature Request
Components: UI - Shell
Affects Versions: 2.6.0.Final
Reporter: Antonio Goncalves
Fix For: 2.x Future
It would be good to have a {{cp}} command like in Forge 1.x
{code}
[no project] bin $ help cp
[cp] - Copy a file or directory
[OPTIONS]
[Arg #1] - source - no help text available
[Arg #2] - target - no help text available
[no project] bin $ exit
{code}
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 6 months
[JBoss JIRA] (FORGE-1785) Explicitly setup in scaffolding, not in Bean Validation nor in JPA
by Lincoln Baxter III (JIRA)
[ https://issues.jboss.org/browse/FORGE-1785?page=com.atlassian.jira.plugin... ]
Lincoln Baxter III closed FORGE-1785.
-------------------------------------
Assignee: Vineet Reynolds
Fix Version/s: 2.6.0.Final
(was: 2.x Future)
Resolution: Done
> Explicitly setup in scaffolding, not in Bean Validation nor in JPA
> ------------------------------------------------------------------
>
> Key: FORGE-1785
> URL: https://issues.jboss.org/browse/FORGE-1785
> Project: Forge
> Issue Type: Enhancement
> Components: Scaffold
> Affects Versions: 2.5.0.Final
> Reporter: Antonio Goncalves
> Assignee: Vineet Reynolds
> Fix For: 2.6.0.Final
>
>
> By now, most of the {{setup}} commands are optional (see [FORGE-1686] or [FORGE-1479]). Forge takes the setup by default if not specified. Same should happen with scaffolding. Today, to scaffold a JSF application, we need to execute :
> {code}
> scaffold-setup
> scaffold-generate --targets org.test.model.* ;
> {code}
> It would be better if, following the same principals, the setup command would run as a default, and only this would be needed :
> {code}
> scaffold-generate --targets org.test.model.* ;
> {code}
> If we want to explicitelly scaffold an AngularJS app, then we would go :
> {code}
> scaffold-setup --provider AngularJS ;
> scaffold-generate --targets org.test.model.* ;
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 6 months
[JBoss JIRA] (FORGE-1785) Explicitly setup in scaffolding, not in Bean Validation nor in JPA
by Lincoln Baxter III (JIRA)
[ https://issues.jboss.org/browse/FORGE-1785?page=com.atlassian.jira.plugin... ]
Lincoln Baxter III commented on FORGE-1785:
-------------------------------------------
Yep! This has been fixed in 2.6.0.Final, thanks for pointing this out!
> Explicitly setup in scaffolding, not in Bean Validation nor in JPA
> ------------------------------------------------------------------
>
> Key: FORGE-1785
> URL: https://issues.jboss.org/browse/FORGE-1785
> Project: Forge
> Issue Type: Enhancement
> Components: Scaffold
> Affects Versions: 2.5.0.Final
> Reporter: Antonio Goncalves
> Fix For: 2.6.0.Final
>
>
> By now, most of the {{setup}} commands are optional (see [FORGE-1686] or [FORGE-1479]). Forge takes the setup by default if not specified. Same should happen with scaffolding. Today, to scaffold a JSF application, we need to execute :
> {code}
> scaffold-setup
> scaffold-generate --targets org.test.model.* ;
> {code}
> It would be better if, following the same principals, the setup command would run as a default, and only this would be needed :
> {code}
> scaffold-generate --targets org.test.model.* ;
> {code}
> If we want to explicitelly scaffold an AngularJS app, then we would go :
> {code}
> scaffold-setup --provider AngularJS ;
> scaffold-generate --targets org.test.model.* ;
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 6 months
[JBoss JIRA] (FORGE-1436) Implement 'help' command as a source of general guidance and flow control
by Daniel Cunha (JIRA)
[ https://issues.jboss.org/browse/FORGE-1436?page=com.atlassian.jira.plugin... ]
Daniel Cunha edited comment on FORGE-1436 at 6/1/14 2:06 AM:
-------------------------------------------------------------
Or add 'help' attribute in Metadata as 'description' attribute?
was (Author: danielcunha):
Or add 'help' attribute in Metadata?
> Implement 'help' command as a source of general guidance and flow control
> -------------------------------------------------------------------------
>
> Key: FORGE-1436
> URL: https://issues.jboss.org/browse/FORGE-1436
> Project: Forge
> Issue Type: Sub-task
> Components: UI - Shell
> Affects Versions: 2.0.0.Beta4
> Reporter: Antonio Goncalves
> Fix For: 2.x Future
>
>
> I find this one usefull and it could even add more content (such as mentioning the {{man}} command...
> {code}
> [no project] Forge $ help
> Welcome to JBoss Forge, a next-generation interactive Shell and project-generation tool. If you find yourself lost, or uncertain how to complete an operation, you may press the <TAB> key for command-completion, or <TAB><TAB> for hints while typing a command.
> Type 'list-commands' for a list of available commands in the current Resource context.
> You are not working on a project. Type 'help new-project' to get started.
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 6 months
[JBoss JIRA] (FORGE-1436) Implement 'help' command as a source of general guidance and flow control
by Daniel Cunha (JIRA)
[ https://issues.jboss.org/browse/FORGE-1436?page=com.atlassian.jira.plugin... ]
Daniel Cunha commented on FORGE-1436:
-------------------------------------
Or add 'help' attribute in Metadata?
> Implement 'help' command as a source of general guidance and flow control
> -------------------------------------------------------------------------
>
> Key: FORGE-1436
> URL: https://issues.jboss.org/browse/FORGE-1436
> Project: Forge
> Issue Type: Sub-task
> Components: UI - Shell
> Affects Versions: 2.0.0.Beta4
> Reporter: Antonio Goncalves
> Fix For: 2.x Future
>
>
> I find this one usefull and it could even add more content (such as mentioning the {{man}} command...
> {code}
> [no project] Forge $ help
> Welcome to JBoss Forge, a next-generation interactive Shell and project-generation tool. If you find yourself lost, or uncertain how to complete an operation, you may press the <TAB> key for command-completion, or <TAB><TAB> for hints while typing a command.
> Type 'list-commands' for a list of available commands in the current Resource context.
> You are not working on a project. Type 'help new-project' to get started.
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 6 months
[JBoss JIRA] (FORGE-1436) Implement 'help' command as a source of general guidance and flow control
by Daniel Cunha (JIRA)
[ https://issues.jboss.org/browse/FORGE-1436?page=com.atlassian.jira.plugin... ]
Daniel Cunha commented on FORGE-1436:
-------------------------------------
To Aesh command, the simple way to get help:
https://gist.github.com/danielsoro/db105fb45202a8b28d33
But, to forge command, I think that necessary create something that return the information, some as getInformationHelp() in IUCommand?
> Implement 'help' command as a source of general guidance and flow control
> -------------------------------------------------------------------------
>
> Key: FORGE-1436
> URL: https://issues.jboss.org/browse/FORGE-1436
> Project: Forge
> Issue Type: Sub-task
> Components: UI - Shell
> Affects Versions: 2.0.0.Beta4
> Reporter: Antonio Goncalves
> Fix For: 2.x Future
>
>
> I find this one usefull and it could even add more content (such as mentioning the {{man}} command...
> {code}
> [no project] Forge $ help
> Welcome to JBoss Forge, a next-generation interactive Shell and project-generation tool. If you find yourself lost, or uncertain how to complete an operation, you may press the <TAB> key for command-completion, or <TAB><TAB> for hints while typing a command.
> Type 'list-commands' for a list of available commands in the current Resource context.
> You are not working on a project. Type 'help new-project' to get started.
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 6 months