docs: public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
          final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
          final ServiceModuleLoader deploymentModuleLoader = deploymentUnit.getAttachment(Attachments.SERVICE_MODULE_LOADER);
          final List<ResourceRoot> allResourceRoots = DeploymentUtils.allResourceRoots(deploymentUnit);
          DeploymentUnit top = deploymentUnit.getParent() == null ? deploymentUnit : deploymentUnit.getParent();
  
          Set<ModuleIdentifier> additionalModules = new HashSet<>();
          for(AdditionalModuleSpecification i : top.getAttachmentList(Attachments.ADDITIONAL_MODULES)) {
              additionalModules.add(i.getModuleIdentifier());
          }
          for (final ResourceRoot resourceRoot : allResourceRoots) {
              final Manifest manifest = resourceRoot.getAttachment(Attachments.MANIFEST);
              if (manifest == null)
                  continue;
  
              final String dependencyString = ManifestHelper.getMainAttributeValue(manifest, DEPENDENCIES_ATTR);
              if (dependencyString == null)
                  continue;
  
              if(deploymentUnit.getParent() == null &&
                      SubDeploymentMarker.isSubDeployment(resourceRoot)) {
                  //we do not want ears reading sub deployments manifests
                  continue;
              }
  
              final String[] dependencyDefs = dependencyString.split(",");
              for (final String dependencyDef : dependencyDefs) {
                  final String trimmed = dependencyDef.trim();
                  if(trimmed.isEmpty()) {
                      continue;
                  }
                  final String[] dependencyParts = trimmed.split(" ");
  
                  final ModuleIdentifier dependencyId = ModuleIdentifier.fromString(dependencyParts[0]);
                  final boolean export = containsParam(dependencyParts, EXPORT_PARAM);
                  final boolean optional = containsParam(dependencyParts, OPTIONAL_PARAM);
                  final boolean services = containsParam(dependencyParts, SERVICES_PARAM);
                  final boolean annotations = containsParam(dependencyParts, ANNOTATIONS_PARAM);
                  final boolean metaInf = containsParam(dependencyParts, META_INF);
                  final ModuleLoader dependencyLoader;
                  if (dependencyId.getName().startsWith(ServiceModuleLoader.MODULE_PREFIX)) {
                      dependencyLoader = deploymentModuleLoader;
                  } else {
                      dependencyLoader = Module.getBootModuleLoader();
                  }
                  if(annotations) {
                      deploymentUnit.addToAttachmentList(Attachments.ADDITIONAL_ANNOTATION_INDEXES, dependencyId);
                      if(dependencyLoader == deploymentModuleLoader && !additionalModules.contains(dependencyId)) {
                          //additional modules will not be created till much later, a dep on them would fail
                          phaseContext.addToAttachmentList(Attachments.NEXT_PHASE_DEPS, ServiceModuleLoader.moduleServiceName(dependencyId));
                      }
                  }
  
                  final ModuleDependency dependency = new ModuleDependency(dependencyLoader, dependencyId, optional, export, services, true);
                  if(metaInf) {
                      dependency.addImportFilter(PathFilters.getMetaInfSubdirectoriesFilter(), true);
                      dependency.addImportFilter(PathFilters.getMetaInfFilter(), true);
                  }
                  deploymentUnit.addToAttachmentList(Attachments.MANIFEST_DEPENDENCIES, dependency);
              }
          }
  
      }