code: public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
          final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
  
          // we only want to process top level jar deployments
          if (deploymentUnit.getParent() != null) {
              return;
          }
  
          final ResourceRoot deploymentRoot = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_ROOT);
  
          if (!deploymentRoot.getRoot().getName().endsWith(".jar")) {
              return;
          }
          // we are only interested in the root manifest
          // there should not be any additional resource roots for this type of deployment anyway
          final Manifest manifest = deploymentRoot.getAttachment(Attachments.MANIFEST);
          if (manifest == null) {
              return;
          }
          final Attributes mainAttributes = manifest.getMainAttributes();
          final String extensionName = mainAttributes.getValue(EXTENSION_NAME);
          ServerLogger.DEPLOYMENT_LOGGER.debugf("Found Extension-Name manifest entry %s in %s", extensionName, deploymentRoot.getRoot().getPathName());
          if (extensionName == null) {
              // no entry
              return;
          }
          final String implVersion = mainAttributes.getValue(IMPLEMENTATION_VERSION);
          final String implVendorId = mainAttributes.getValue(IMPLEMENTATION_VENDOR_ID);
          final String specVersion = mainAttributes.getValue(SPECIFICATION_VERSION);
          final ExtensionInfo info = new ExtensionInfo(extensionName, specVersion, implVersion, implVendorId);
          deploymentUnit.putAttachment(Attachments.EXTENSION_INFORMATION, info);
  
          phaseContext.addToAttachmentList(Attachments.NEXT_PHASE_DEPS, Services.JBOSS_DEPLOYMENT_EXTENSION_INDEX);
      }
docs: {@inheritDoc}