ApplicationMetadata appMetadata = app.getApplicationMetadata();
appMetadata.store(new File(directory, AppConstants.APPLICATION_MF));
DeploymentMetadata deploymentMetadata = app.getDeploymentMetadata();
if (deploymentMetadata != null) {
deploymentMetadata.store(new File(directory, AppConstants.DEPLOYMENT_MF));
}
for (BundleInfo bi : app.getBundleInfo()) {
// bi.getLocation() will return a URL to the source bundle. It may be of the form
// file:/path/to/my/file.jar, or