Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.9.6
-
Fix Version/s: None
-
Component/s: Command Line
-
Labels:None
Description
On Sun, 2011-11-27 at 15:41 -0600, Bob Swift wrote: Can a gant script get access to the unprocessed command line options? Or a list of options and values? Specifically without knowing that xxx is expected. For example: is there any way to get "-v Dxxx=yyy" in the script when it is started via: gant -v -Dxxx=yyy
On December 18, 2011 12:50:46 AM Russel Winder wrote: The command line is processed in the processArgs method of gant.Gant. It uses a CliBuilder to parse and process the command line arguments. Currently this is a closed system in that the results of the parsing and processing are held in local variables, and so not available outside this function. If it were seen as important to have this available then the results could be put into the global binding. This would though be a change of semantics and so would have to trigger at least a new minor version if not a new major version. Certainly doable.
The use case I am trying to solve is having a gant script that executes a number of similar gant scripts and needs to start them with most of the same parameters without knowing ahead of time the list of possible parameters. Groovy provides args for instance, but this is not available in Gant.