AssetGroup group = null;
if (policy == null) {
logger.warn("asset-group-not-found",
new Object[]{reference.getName(), asset.getName()});
} else {
ActivatedBaseURLPolicy baseURL = (ActivatedBaseURLPolicy) policy;
group = new AssetGroup();
group.setProject(baseURL.getActualProject());
group.setName(assetGroupName);
group.setPrefixURL(baseURL.getBaseURL());
final BaseLocation baseLocation = baseURL.getBaseLocation();
if (baseLocation == BaseLocation.DEVICE) {
group.setLocationType(AssetGroup.ON_DEVICE);
} else if (baseLocation == BaseLocation.CONTEXT) {
group.setLocationType(AssetGroup.CONTEXT);
} else if (baseLocation == BaseLocation.HOST) {