private Map<String, HeaderDefinition> buildHeaderDefinitions() throws MojoFailureException {
// like mappings, first get default definitions
final Map<String, HeaderDefinition> headers = new HashMap<String, HeaderDefinition>(HeaderType.defaultDefinitions());
// and then override them with those provided in properties file
for (String resource : headerDefinitions) {
final AdditionalHeaderDefinition fileDefinitions = new AdditionalHeaderDefinition(XMLDoc.from(finder.findResource(resource), true));
final Map<String, HeaderDefinition> map = fileDefinitions.getDefinitions();
debug("%d header definitions loaded from '%s'", map.size(), resource);
headers.putAll(map);
}
// force inclusion of unknow item to manage unknown files
headers.put(HeaderType.UNKNOWN.getDefinition().getType(), HeaderType.UNKNOWN.getDefinition());