in taverna-maven-plugin/src/main/java/org/apache/taverna/mavenplugin/TavernaProfileDeployMojo.java [250:268]
private Set<BundleInfo> getRequiredBundles(ApplicationProfile currentProfile,
ApplicationProfile newProfile) {
Set<BundleInfo> requiredBundles = new HashSet<BundleInfo>();
Map<String, BundleInfo> currentBundles = new HashMap<String, BundleInfo>();
for (BundleInfo bundle : currentProfile.getBundle()) {
currentBundles.put(bundle.getSymbolicName(), bundle);
}
for (BundleInfo bundle : newProfile.getBundle()) {
if (currentBundles.containsKey(bundle.getSymbolicName())) {
BundleInfo currentBundle = currentBundles.get(bundle.getSymbolicName());
if (!bundle.getVersion().equals(currentBundle.getVersion())) {
requiredBundles.add(bundle);
}
} else {
requiredBundles.add(bundle);
}
}
return requiredBundles;
}