in apache-rat-tasks/src/main/java/org/apache/rat/anttasks/Report.java [410:438]
public ReportConfiguration getConfiguration() {
try {
boolean helpLicenses = !getValues(Arg.HELP_LICENSES).isEmpty();
removeKey(Arg.HELP_LICENSES);
final ReportConfiguration configuration = OptionCollection.parseCommands(new File("."), args().toArray(new String[0]),
o -> DefaultLog.getInstance().warn("Help option not supported"),
true);
if (getValues(Arg.OUTPUT_FILE).isEmpty()) {
configuration.setOut(() -> new LogOutputStream(this, Project.MSG_INFO));
}
DocumentName name = DocumentName.builder(getProject().getBaseDir()).build();
configuration.addSource(new ResourceCollectionContainer(name, configuration, nestedResources));
configuration.addApprovedLicenseCategories(deprecatedConfig.approvedLicenseCategories);
configuration.removeApprovedLicenseCategories(deprecatedConfig.removedLicenseCategories);
if (deprecatedConfig.inputFileFilter != null) {
configuration.addExcludedFilter(deprecatedConfig.inputFileFilter);
}
families.stream().map(Family::build).forEach(configuration::addFamily);
licenses.stream().map(License::asBuilder)
.forEach(l -> configuration.addApprovedLicenseCategory(configuration.addLicense(l).getLicenseFamily()));
if (helpLicenses) {
new org.apache.rat.help.Licenses(configuration, new PrintWriter(DefaultLog.getInstance().asWriter())).printHelp();
}
return configuration;
} catch (IOException | ImplementationException e) {
throw new BuildException(e.getMessage(), e);
}
}