use of org.apache.hyracks.maven.license.project.Project in project asterixdb by apache.
the class GenerateFileMojo method readExtraMaps.
private void readExtraMaps() throws IOException {
final ObjectMapper objectMapper = new ObjectMapper();
for (ExtraLicenseFile extraLicenseFile : extraLicenseMaps) {
for (LicensedProjects projects : objectMapper.readValue(extraLicenseFile.getFile(), LicensedProjects[].class)) {
LicenseSpec spec = urlToLicenseMap.get(projects.getLicense().getUrl());
if (spec != null) {
// propagate any license content we may have with what already has been loaded
if (projects.getLicense().getContent() != null && spec.getContent() == null) {
spec.setContent(projects.getLicense().getContent());
}
// propagate any license displayName we may have with what already has been loaded
if (projects.getLicense().getDisplayName() != null && spec.getDisplayName() == null) {
spec.setDisplayName(projects.getLicense().getDisplayName());
}
}
for (Project p : projects.getProjects()) {
p.setLocation(extraLicenseFile.getLocation());
addProject(p, projects.getLicense(), extraLicenseFile.isAdditive());
}
}
}
}
Aggregations