return true;
}
public InstallOrUpgradeStatus installOrUpgradeAddOn(PluginVersion pluginVersion, boolean install) {
synchronized (mutex) {
BundleVersion bundleVersion = ((RooAddOnVersion)pluginVersion).getBundleVersion();
Bundle bundle = ((RooAddOnVersion)pluginVersion).getBundle();
if (!verifyRepository(bundleVersion.getObrUrl())) {
return InstallOrUpgradeStatus.INVALID_REPOSITORY_URL;
}
boolean success = true;
int count = countBundles();
boolean requiresWrappedCoreDep = bundleVersion.getDescription().contains("#wrappedCoreDependency");
if (requiresWrappedCoreDep && !shell.executeCommand("osgi obr url add --url http://spring-roo-repository.springsource.org/repository.xml")) {
success = false;
}
if (!shell.executeCommand("osgi obr url add --url " + bundleVersion.getObrUrl())) {
success = false;
}
if (!shell.executeCommand("osgi obr start --bundleSymbolicName " + bundle.getSymbolicName())) {
success = false;
}
if (!shell.executeCommand("osgi obr url remove --url " + bundleVersion.getObrUrl())) {
success = false;
}
if (requiresWrappedCoreDep && !shell.executeCommand("osgi obr url remove --url http://spring-roo-repository.springsource.org/repository.xml")) {
success = false;
}