[forge-issues] [JBoss JIRA] (FORGE-2280) Being able to use ~ as the top level package root directory

Antonio Goncalves (JIRA) issues at jboss.org
Sat Mar 14 11:40:18 EDT 2015


     [ https://issues.jboss.org/browse/FORGE-2280?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Antonio Goncalves closed FORGE-2280.
------------------------------------
    Resolution: Duplicate Issue


> Being able to use ~ as the top level package root directory
> -----------------------------------------------------------
>
>                 Key: FORGE-2280
>                 URL: https://issues.jboss.org/browse/FORGE-2280
>             Project: Forge
>          Issue Type: Feature Request
>          Components: UI - Shell
>    Affects Versions: 2.15.1.Final
>            Reporter: Antonio Goncalves
>             Fix For: 2.x Future
>
>
> In Forge 1.x there was this notion of project root (with {{~~}}) but also the top level package root (with {{~}}). So we could write something like that :
> {code}
> new-project --named test --topLevelPackage com.mycomp.myproj
> java new-class --named Test --package ~.constraints
> Wrote com.mycomp.myproj.constraints.Test.java
> {code}
> With the {{--package ~.constraints}} paramater, it will create a class under {{com.mycomp.myproj.constraints}} because {{~}} represents the top level package {{com.mycomp.myproj}}.
> This is not possible with Forge 2.x. The same code in Forge 2.x produces the following exception : 
> {code}
> project-new --named test --topLevelPackage com.mycomp.myproj
> java-new-class --named Test --targetPackage ~.constraints
> Exception when parsing/running: java-new-class --named Test6 --targetPackage ~.constraints, Invalid identifier : >~<
> {code}
> When writing Forge scripts, it's much easier and reusable to be able to use the {{~}} represents the top level package. 



--
This message was sent by Atlassian JIRA
(v6.3.11#6341)


More information about the forge-issues mailing list