public void execute() throws MojoFailureException, MojoExecutionException { fixCompileSourceRoots(); showDependencies(); Map<String,CommandLineOption> commandLineOptions = this.fillOptionMap(); CommandLineOptionParser parser = new CommandLineOptionParser(commandLineOptions); try { new CodeGenerationEngine(parser).generate(); } catch (CodeGenerationException e) { Throwable t = e; while (t.getCause() != null) { t = t.getCause(); } t.printStackTrace(); throw new MojoExecutionException(e.getMessage(), e); } }
String confLocation = null; CommandLineOptionParser optionsParser = new CommandLineOptionParser(args); List invalidOptionsList = optionsParser.getInvalidOptions(new OptionsValidator() { public boolean isInvalid(CommandLineOption option) {
String confLocation = null; CommandLineOptionParser optionsParser = new CommandLineOptionParser(args); List invalidOptionsList = optionsParser.getInvalidOptions(new OptionsValidator() { public boolean isInvalid(CommandLineOption option) {
Map allOptions; try { CommandLineOptionParser commandLineOptionParser = new CommandLineOptionParser(args); allOptions = commandLineOptionParser.getAllOptions();
public void execute() throws BuildException { try { /* * This needs the ClassLoader we use to load the task * have all the dependancies set, hope that * is ok for now */ AntClassLoader cl = new AntClassLoader( getClass().getClassLoader(), getProject(), classpath == null ? createClasspath() : classpath, false); Thread.currentThread().setContextClassLoader(cl); Map commandLineOptions = this.fillOptionMap(); CommandLineOptionParser parser = new CommandLineOptionParser(commandLineOptions); CodeGenConfiguration config = new CodeGenConfiguration(); CodegenConfigLoader.loadConfig(config, parser.getAllOptions()); new CodeGenerationEngine(config).generate(); } catch (Throwable e) { throw new BuildException(e); } }
String confLocation = null; CommandLineOptionParser optionsParser = new CommandLineOptionParser(args); List invalidOptionsList = optionsParser.getInvalidOptions(new OptionsValidator() { public boolean isInvalid(CommandLineOption option) {
String confLocation = null; CommandLineOptionParser optionsParser = new CommandLineOptionParser(args); List invalidOptionsList = optionsParser.getInvalidOptions(new OptionsValidator() { public boolean isInvalid(CommandLineOption option) {
String confLocation = null; CommandLineOptionParser optionsParser = new CommandLineOptionParser(args); List invalidOptionsList = optionsParser.getInvalidOptions(new OptionsValidator() { public boolean isInvalid(CommandLineOption option) {
public static void main(String[] args) throws Exception { CommandLineOptionParser commandLineOptionParser = new CommandLineOptionParser( args); checkAuthentication(commandLineOptionParser); setSystemProperties(commandLineOptionParser); //If it is a JAX-WS code generation request call WSimportTool. if (isJwsOptionEnabled(commandLineOptionParser)){ new JAXWSCodeGenerationEngine(commandLineOptionParser, args).generate(); return; } if (isOptionsValid(commandLineOptionParser)){ CodeGenConfiguration config = new CodeGenConfiguration(); CodegenConfigLoader.loadConfig(config, commandLineOptionParser.getAllOptions()); new CodeGenerationEngine(config).generate(); } else { printUsage(); } }