boolean isShared = !isWar(name, file);
Resource resource = findMavenResource(mvnCoords, url, isShared);
if (resource == null) {
LOGGER.warn("Could not find resource for " + mvnCoords + " and " + url);
} else {
ResourceIdentity identity = resource.getIdentity();
Resource oldResource = installedResources.remove(identity);
if (oldResource == null && !resourcehandleMap.containsKey(identity)) {
if (isShared) {
// TODO lest not deploy shared stuff for now since bundles throw an exception when trying to stop them
// which breaks the tests ;)
LOGGER.debug("TODO not installing " + (isShared ? "shared" : "non-shared") + " resource: " + identity);
} else {
LOGGER.info("Installing " + (isShared ? "shared" : "non-shared") + " resource: " + identity);
resourcesToInstall.add(resource);
resourceUrisInstalled.add(name);
}
}
}
}
for (Resource installedResource : installedResources.values()) {
ResourceIdentity identity = installedResource.getIdentity();
ResourceHandle resourceHandle = resourcehandleMap.get(identity);
if (resourceHandle == null) {
// TODO should not really happen when we can ask about the installed Resources
LOGGER.warn("TODO: Cannot uninstall " + installedResource + " as we have no handle!");
} else {