[NO ISSUE][LIC] Fix override of both LICENSE and NOTICE for a single GAV
Change-Id: If1ceb510c7de8abdf46690a85368409f99907325
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2918
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Murtadha Hubail <mhubail@apache.org>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
diff --git a/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/LicenseMojo.java b/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/LicenseMojo.java
index 05ac62b..e72404c 100644
--- a/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/LicenseMojo.java
+++ b/hyracks-fullstack/hyracks/hyracks-maven-plugins/license-automation-plugin/src/main/java/org/apache/hyracks/maven/license/LicenseMojo.java
@@ -364,13 +364,16 @@
MavenProject dep = dependencyGavMap.get(gav);
if (dep == null) {
getLog().warn("Unused override dependency " + gav + "; ignoring...");
- } else if (override.getUrl() != null) {
+ continue;
+ }
+ if (override.getUrl() != null) {
final List<Pair<String, String>> newLicense =
Collections.singletonList(new ImmutablePair<>(override.getUrl(), override.getName()));
List<Pair<String, String>> prevLicense = dependencyLicenseMap.put(dep, newLicense);
warnUnlessFlag(dep, IGNORE_LICENSE_OVERRIDE, "license list for " + toGav(dep)
+ " changed with <override>; was: " + prevLicense + ", now: " + newLicense);
- } else if (override.getNoticeUrl() != null) {
+ }
+ if (override.getNoticeUrl() != null) {
noticeOverrides.put(gav, override.getNoticeUrl());
warnUnlessFlag(dep, IGNORE_NOTICE_OVERRIDE,
"notice for " + toGav(dep) + " changed with <override>; now: " + override.getNoticeUrl());