}
}
// process the recipe
String recipe = bundleVersion.getRecipe();
RecipeParser parser = new RecipeParser();
ProcessingRecipeContext recipeContext = new ProcessingRecipeContext(recipe, request
.getPackageVersionFiles(), this.resourceContext.getSystemInformation(), request
.getBundleFilesLocation().getAbsolutePath(), resourceDeployment, bundleManagerProvider);
bundleManagerProvider.auditDeployment(resourceDeployment, "Configurtion Variable Replacement",
bundleDeployment.getName(), null, null, "setting replacement variable values using ["
+ bundleDeployment.getConfiguration().toString(true) + "]", null);
recipeContext.setReplacementVariableValues(bundleDeployment.getConfiguration());
recipeContext.addReplacementVariableValue(DEPLOY_DIR, request.getAbsoluteDestinationDirectory()
.getAbsolutePath());
recipeContext.addReplacementVariableValue(DEPLOY_ID, Integer.toString(bundleDeployment.getId()));
recipeContext.addReplacementVariableValue(DEPLOY_NAME, bundleDeployment.getName());
parser.setReplaceReplacementVariables(true);
bundleManagerProvider.auditDeployment(resourceDeployment, "Parse Recipe", bundleDeployment.getName(), null,
null, "Parsing Recipe using context [" + recipeContext + "]", null);
parser.parseRecipe(recipeContext);
} catch (Throwable t) {
log.error("Failed to deploy bundle [" + request + "]", t);
result.setErrorMessage(t);
}