public ExmlConfiguration parse(String[] args) throws CommandLineParseException { ExmlConfiguration config = new ExmlConfiguration(); CmdLineParser parser = new CmdLineParser(config); try { // parse the arguments. parser.parseArgument(args); } catch (CmdLineException e) { StringBuilder msg = extendedUsage(parser, e); throw new CommandLineParseException(msg.toString(), -1); } return parseConfig(parser, config); } }
public ExmlConfiguration parse(String[] args) throws CommandLineParseException { ExmlConfiguration config = new ExmlConfiguration(); CmdLineParser parser = new CmdLineParser(config); try { // parse the arguments. parser.parseArgument(args); } catch (CmdLineException e) { StringBuilder msg = extendedUsage(parser, e); throw new CommandLineParseException(msg.toString(), -1); } return parseConfig(parser, config); } }
protected ExmlConfiguration createExmlConfiguration(List<File> classPath, List<File> sourcePath, File outputDirectory) throws MojoExecutionException { if (configClassPackage == null) { throw new MojoExecutionException("parameter 'configClassPackage' is missing"); } ExmlConfiguration exmlConfiguration = new ExmlConfiguration(); exmlConfiguration.setConfigClassPackage(configClassPackage); exmlConfiguration.setClassPath(classPath); exmlConfiguration.setOutputDirectory(outputDirectory); try { exmlConfiguration.setSourcePath(sourcePath); } catch (IOException e) { throw new MojoExecutionException("could not determine source directory", e); } return exmlConfiguration; }
@Override public void execute() throws MojoExecutionException { String configClassPackage = getNamespaces()[0].getUri().substring(EXML_CONFIG_URI_PREFIX.length()); ExmlConfiguration exmlConfiguration = new ExmlConfiguration(); exmlConfiguration.setConfigClassPackage(configClassPackage); exmlConfiguration.setClassPath(getMavenPluginHelper().getActionScriptClassPath(false)); exmlConfiguration.setOutputDirectory(getSourceDirectory()); try { exmlConfiguration.setSourcePath(Collections.singletonList(getSourceDirectory())); } catch (IOException e) { throw new MojoExecutionException("could not determine source directory", e); } try { new MxmlLibraryManifestGenerator(new ConfigClassRegistry(exmlConfiguration)).createManifestFile(); } catch (IOException e) { throw new MojoExecutionException("could not generate manifest", e); } } }