public class WebBundleStructureProcessor implements DeploymentUnitProcessor {
@Override
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
DeploymentUnit depUnit = phaseContext.getDeploymentUnit();
OSGiMetaData metadata = depUnit.getAttachment(OSGiConstants.OSGI_METADATA_KEY);
<BUG>if (metadata == null) {

Manifest manifest = WebBundleURIParser.parse(depUnit.getName());</BUG>
if (manifest != null) {
metadata = OSGiMetaDataBuilder.load(manifest);

public class WebBundleStructureProcessor implements DeploymentUnitProcessor {
@Override
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
DeploymentUnit depUnit = phaseContext.getDeploymentUnit();
OSGiMetaData metadata = depUnit.getAttachment(OSGiConstants.OSGI_METADATA_KEY);
if (metadata != null)
return;
Deployment dep = BundleLifecycleIntegration.getDeployment(depUnit.getName());
if (dep != null)
return;
Manifest manifest = WebBundleURIParser.parse(depUnit.getName());
if (manifest != null) {
metadata = OSGiMetaDataBuilder.load(manifest);
