If there is some way to get a reference to the DeploymentUnit from WAR application code then I can call WeldDeploymentMarker.isWeldDeployment(deploymentUnit).