metaonly module xdc.tools.repoman.sg.Main

Command implementation

For more information about how to use this tool, see the xdc.tools.repoman.sg User's Guide. [ more ... ]
Configuration settings sourced in xdc/tools/repoman/sg/Main.xdc
var Main = xdc.useModule('xdc.tools.repoman.sg.Main');
module-wide config parameters
        '[--packagepath PATH]'
    ];
module-wide functions
    Main.exec// xs script entry point(Any args) returns Any
    Main.main// xs shell entry point(Any args) returns Any
per-instance config parameters
    var params = new Main.Params// Instance config-params object;
        params.pathArg// repositories to scan for packages = String null;
per-instance functions
    inst.run// Underlying implementation of the command(Cmdr.Instance cmdr, String[] args) returns Any
 
DETAILS
For more information about how to use this tool, see the xdc.tools.repoman.sg User's Guide.
SEE
 
config Main.usage  // module-wide

Usage for this command

Configuration settings
Main.usage = String[] [
    '[--packagepath PATH]'
];
 
 
Main.exec()  // module-wide

xs script entry point

Configuration settings
Main.exec(Any args) returns Any
 
DETAILS
This function is called from within other XDCscript scripts and performs the same operations as main() except that, rather than output the return value of inst.run(), this value is simply returned to the caller of exec().
 
Main.main()  // module-wide

xs shell entry point

Configuration settings
Main.main(Any args) returns Any
 
DETAILS
This function
  • creates a no-arg instance, inst, of the module inheriting this interface;
  • parses command line arguments placing all options in the config params of the inheriting module;
  • creates a xdc.tools.Cmdr instance, cmdr;
  • calls inst.run() with the cmdr and any command line command line arguments not parsed as options; and
  • outputs the return result from inst.run()
Instance Config Parameters

Configuration settings
var params = new Main.Params;
// Instance config-params object
    params.pathArg = String null;
    // repositories to scan for packages
 
config Main.Params.pathArg  // instance

repositories to scan for packages

Configuration settings
var params = new Main.Params;
  ...
params.pathArg = String null;
 
 
Main.run()  // instance

Underlying implementation of the command

Configuration settings
inst.run(Cmdr.Instance cmdr, String[] args) returns Any
 
DETAILS
Since this method is used to support both command line tools and other XDCscript scripts, it is important to avoid explicit termination of the JVM via java.lang.System.exit(); doing so precludes callers from handling failures.
Implementations should instead call
generated on Wed, 09 Aug 2017 16:38:23 GMT