this.packages.put(id, pkg);
this.primary.add(pkg);
continue;
}
IVersion version = this.getVersion(pkg.getGroupId(), pkg.getArtifactId(), id, null);
if (version == null) {
this.packages.put(id, pkg);
} else if (version.compareTo( pkg.getVersion() ) < 0) {
IClassPackage old = this.packages.get(id);
if (this.isPrimaryPackage(pkg, this)) {
conflicts.add(pkg);
log.info("Canceling upgrade for primary " + old + " [new: " + pkg + "]");
} else {
log.info("Upgrading from " + old + " to " + pkg);
this.removeFromScope(pkg, this);
this.packages.put(id, pkg);
}
} else if (version.compareTo( pkg.getVersion() ) > 0) {
conflicts.add(pkg); this.conflicts.add(pkg);
}
}
return conflicts;