add starter shell script and cleanup jar CLI options
This commit is contained in:
@ -89,6 +89,7 @@ class GeneratorMain {
|
||||
throw new ParseException("error validating " + resource.URI)
|
||||
}
|
||||
// Configure and start the generator
|
||||
resource.runGenerator(params.outputFile)
|
||||
logger.info('Code generation for ' + file + ' finished')
|
||||
}
|
||||
} catch (MalformedParametersException | IllegalArgumentException | ParseException e) {
|
||||
@ -98,14 +99,14 @@ class GeneratorMain {
|
||||
return 0
|
||||
}
|
||||
|
||||
def runGenerator(Resource resource, File template, File outputFile){
|
||||
logger.info('Running generator to generate '+outputFile+' using template '+template)
|
||||
if(template !== null) System.properties.put("template", template)
|
||||
def runGenerator(Resource resource, File outputFile){
|
||||
if(outputFile !== null){
|
||||
System.properties.put("outputFile", outputFile.name)
|
||||
fsa.outputPath = outputFile.parentFile.absolutePath
|
||||
} else
|
||||
logger.info('Running generator to generate files in '+outputFile)
|
||||
fsa.outputPath = outputFile.absolutePath
|
||||
} else {
|
||||
logger.info('Running generator to generate files')
|
||||
fsa.outputPath = './'
|
||||
}
|
||||
val outputCfg = fsa.outputConfigurations.get(IFileSystemAccess.DEFAULT_OUTPUT)
|
||||
outputCfg.setOverrideExistingResources(true)
|
||||
val context = new GeneratorContext => [cancelIndicator = CancelIndicator.NullImpl]
|
||||
|
Reference in New Issue
Block a user