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); } } }