code: public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
          final Map<String, List<String>> foundServices = new HashMap<String, List<String>>();
          final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
          final ResourceRoot deploymentRoot = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_ROOT);
          if (deploymentRoot != null) {
              processRoot(deploymentRoot, foundServices);
          }
          final List<ResourceRoot> resourceRoots = deploymentUnit.getAttachmentList(Attachments.RESOURCE_ROOTS);
          for (ResourceRoot resourceRoot : resourceRoots) {
              if (!SubDeploymentMarker.isSubDeployment(resourceRoot) && ModuleRootMarker.isModuleRoot(resourceRoot))
                  processRoot(resourceRoot, foundServices);
          }
          deploymentUnit.putAttachment(Attachments.SERVICES, new ServicesAttachment(foundServices));
      }
docs: {@inheritDoc}