Union executiondata = task.createExecutiondata();
Path jacocodata = new Path(mxtest.getProject());
jacocodata.setPath(mxtest.getJaCoCoData().getAbsolutePath());
executiondata.add(jacocodata);
GroupElement structure = task.createStructure();
structure.setName(mxtest.getProjectTitle());
// classfiles
Union classfiles = structure.createClassfiles();
Path outputpath = new Path(mxtest.getProject());
outputpath.setPath(mxtest.getClassesDir().getAbsolutePath());
classfiles.add(outputpath);
MaxmlMap attributes = mxtest.getBuild().getConfig().getTaskAttributes(mxtest.getTaskName());
if (attributes == null) {
attributes = new MaxmlMap();
}
// source files
SourceFilesElement sourcefiles = structure.createSourcefiles();
sourcefiles.setEncoding(attributes.getString("encoding", null));
Path sourcepath = new Path(mxtest.getProject());
sourcepath.setRefid(new Reference(mxtest.getProject(), Key.compileSourcePath.referenceId()));
sourcefiles.add(sourcepath);