use of org.apache.maven.plugin.antrun.AntrunXmlPlexusConfigurationWriter in project randomizedtesting by randomizedtesting.
the class JUnit4Mojo method appendRawXml.
/**
* Append raw XML configuration.
*/
private void appendRawXml(PlexusConfiguration config, Element elem) {
try {
if (config == null) {
return;
}
StringWriter writer = new StringWriter();
AntrunXmlPlexusConfigurationWriter xmlWriter = new AntrunXmlPlexusConfigurationWriter();
xmlWriter.write(config, writer);
Element root = new SAXReader().read(new StringReader(writer.toString())).getRootElement();
root.detach();
elem.add(root);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
Aggregations