*/
protected ArrayList excludes;
public void execute() throws MojoExecutionException, MojoFailureException {
JApplication task = new JApplication();
// TODO, andrus, 9/28/2006 - hook up maven loggers to the Ant project.
task.setProject(new Project());
task.setName(name);
task.setMainClass(mainClass);
task.setDestDir(destDir);
task.setOs(os);
task.setLongName(longName);
task.setIcon(icon);
task.setJvm(jvm);
task.setJvmOptions(jvmOptions);
task.setVersion(version);
ArtifactMatchPattern includesMatcher = new ArtifactMatchPattern(includes);
ArtifactMatchPattern excludesMatcher = new ArtifactMatchPattern(excludes);
Iterator it = project.getCompileArtifacts().iterator();
while (it.hasNext()) {
Artifact a = (Artifact) it.next();
addArtifact(task, a, includesMatcher, excludesMatcher);
}
// add main project artifact
addArtifact(task, project.getArtifact(), includesMatcher, excludesMatcher);
try {
task.execute();
} catch (BuildException e) {
throw new MojoExecutionException("Failed to build application " + name, e);
}
}