in src/main/java/org/apache/maven/plugins/pdf/PdfMojo.java [609:634]
private DocumentModel getDocumentModelFromDescriptor(Locale locale) throws MojoExecutionException {
DocumentModel model;
try {
model = new DocumentDescriptorReader(project, getLog(), locale)
.readAndFilterDocumentDescriptor(docDescriptor);
} catch (XmlPullParserException ex) {
throw new MojoExecutionException("Error reading DocumentDescriptor!", ex);
} catch (IOException io) {
throw new MojoExecutionException("Error opening DocumentDescriptor!", io);
}
if (model.getMeta() == null) {
model.setMeta(new DocumentMeta());
}
if (StringUtils.isEmpty(model.getMeta().getLanguage())) {
model.getMeta().setLanguage(locale.getLanguage());
}
if (StringUtils.isEmpty(model.getMeta().getGenerator())) {
model.getMeta().setGenerator(getDefaultGenerator());
}
return model;
}