-
Feature Request
-
Resolution: Duplicate
-
Major
-
2.15.1.Final
-
None
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 :
new-project --named test --topLevelPackage com.mycomp.myproj java new-class --named Test --package ~.constraints Wrote com.mycomp.myproj.constraints.Test.java
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 :
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 : >~<
When writing Forge scripts, it's much easier and reusable to be able to use the ~ represents the top level package.
- is related to
-
FORGE-2466 Cannot use '~' in most of the command parameters
- Closed
- relates to
-
FORGE-1391 cd~~ not going back to the project root directory
- Closed
-
FORGE-1751 Support Wildcards for package and class names
- Closed
-
FORGE-1941 addon-build-and-install command doesn't understand ~ with a home dir.
- Closed
-
FORGE-2170 Forge addon-build-and-install doesn't work with wildcards "." "~"
- Closed