Fix feature:verify failing on bundle cleanup
Using compatible, but different versions of the same bundle in the same
feature leads to UnsupportedOperationException during feature verify,
due to the deployer attempting to uninstall the unused bundle.
Override uninstall() from StaticInstallSupport to avoid this behavior
@@ -872,6 +872,14 @@ public class VerifyMojo extends MojoSupport {
}
}
+ @Override
+ public void uninstall(Bundle bundle) throws BundleException
+ {
+ for (String region : dstate.bundlesPerRegion.keySet())
+ MapUtils.removeFromMapSet(dstate.bundlesPerRegion, region, bundle.getBundleId());
+ dstate.bundles.remove(bundle.getBundleId());
+ }
+
@Override
public void bundleBlacklisted(BundleInfo bundleInfo) {
