here is a friendly reminder that your DUPs must take OSGi deployments into consideration. So if you mark a given DU as of type foo, you must make sure that foo is also supported as an OSGi bundle deployment.

I constantly fix DUPs that assume that every deployment is a module deployment. Here is the latest one
Caused by: java.lang.NullPointerException

Generally, I don't mind fixing those since I cannot assume that you even know/care what an OSGi bundle deployment is ;-)

However, on our way to x.y.z.Final we probably want to avoid these basic errors.

What do you need to do is to check that a given DU does not contain a valid OSGi Manifest before you mark it as "your type"
    public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
        DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
        if(deploymentUnit.hasAttachment(Attachments.OSGI_MANIFEST)) {
        if(deploymentUnit.getName().toLowerCase().endsWith(WAR_EXTENSION)) {
            DeploymentTypeMarker.setType(DeploymentType.WAR, deploymentUnit);
Please take a minute to review your "entry point" DUP and make sure it ignores OSGi deployments if you are not prepared to handle them.


Thomas Diesler
JBoss OSGi Lead
JBoss, a division of Red Hat