DeploymentUnit depUnit = phaseContext.getDeploymentUnit();
String runtimeName = depUnit.getName();
if (BundleLifecycleIntegration.getDeployment(runtimeName) != null)
return;
OSGiMetaData metadata = depUnit.getAttachment(OSGiConstants.OSGI_METADATA_KEY);
<BUG>if (metadata != null) {
try {</BUG>
VirtualFile virtualFile = depUnit.getAttachment(Attachments.DEPLOYMENT_ROOT).getRoot();
BundleInfo info = BundleInfo.createBundleInfo(AbstractVFS.adapt(virtualFile), runtimeName, metadata);
depUnit.putAttachment(OSGiConstants.BUNDLE_INFO_KEY, info);

DeploymentUnit depUnit = phaseContext.getDeploymentUnit();
String runtimeName = depUnit.getName();
if (BundleLifecycleIntegration.getDeployment(runtimeName) != null)
return;
OSGiMetaData metadata = depUnit.getAttachment(OSGiConstants.OSGI_METADATA_KEY);
DeploymentType deploymentType = depUnit.getAttachment(OSGiConstants.DEPLOYMENT_TYPE_KEY);
if (metadata != null && deploymentType != DeploymentType.Module) {
try {
VirtualFile virtualFile = depUnit.getAttachment(Attachments.DEPLOYMENT_ROOT).getRoot();
BundleInfo info = BundleInfo.createBundleInfo(AbstractVFS.adapt(virtualFile), runtimeName, metadata);
depUnit.putAttachment(OSGiConstants.BUNDLE_INFO_KEY, info);
