use of org.apache.maven.doxia.module.xdoc.XdocSinkFactory in project maven-plugins by apache.
the class SiteMap method generate.
/**
* Generates a sitemap.xml in targetDir/xdoc/.
* This is a valid xdoc document that can be processed by a Doxia parser.
* The file lists all the menus and menu items of the DecorationModel in expanded form.
*
* @param model the DecorationModel to extract the menus from.
* @param targetDir the target output directory. The file will be created in targetDir/xdoc/.
* @param locale the Locale for the result.
*
* @throws IOException if the file cannot be ceated.
*/
public void generate(DecorationModel model, File targetDir, Locale locale) throws IOException {
File outputDir = new File(targetDir, "xdoc");
Sink sink = new XdocSinkFactory().createSink(outputDir, "sitemap.xml", encoding);
try {
extract(model, sink, locale);
} finally {
sink.close();
}
}
Aggregations