@@ -0,0 +1,2270 @@
+package org.bedework.util.deployment;%0A%0Aimport org.w3c.dom.Element;%0A%0Aimport java.io.File;%0Aimport java.io.FileOutputStream;%0Aimport java.util.List;%0A%0A/** Represent a jboss-deployment-structure.xml file.%0A *%0A * @author douglm%0A */%0Apublic class JbossDeploymentStructureXml extends XmlFile %7B%0A  private static final String jbossAllTemplate =%0A        %22%3Cjboss-deployment-structure xmlns=%5C%22urn:jboss:deployment-structure:1.1%5C%22%3E%5Cn%22 +%0A        %22    %3Cdeployment%3E%5Cn%22 +%0A        //%22        %3Cexclusions%3E%5Cn%22 +%0A        //%22            %3Cmodule name=%5C%22org.javassist%5C%22 /%3E%5Cn%22 +%0A        //%22        %3C/exclusions%3E%5Cn%22 +%0A        %22    %3C/deployment%3E%5Cn%22 +%0A        %22%3C/jboss-deployment-structure%3E%5Cn%22 +%0A        %22%5Cn%22;%0A%0A  private final PropertiesChain props;%0A%0A  public static void generate(final File earMeta) throws Throwable %7B%0A    // Generate a jboss-all.xml%0A    final File jbossAllF = new File(earMeta.getAbsolutePath(),%0A                                    %22jboss-deployment-structure.xml%22);%0A%0A    final FileOutputStream fos = new FileOutputStream(jbossAllF, false);%0A    fos.write(jbossAllTemplate.getBytes());%0A    fos.close();%0A  %7D%0A%0A  public JbossDeploymentStructureXml(final Utils utils,%0A                                     final File metaInf,%0A                                     final PropertiesChain props) throws Throwable %7B%0A    super(utils, metaInf, %22jboss-deployment-structure.xml%22, false);%0A    this.props = props;%0A  %7D%0A%0A  public void update() throws Throwable %7B%0A    utils.debug(%22Update %22 + theXml.getAbsolutePath());%0A%0A    final List%3CString%3E earExclusions = %0A            props.listProperty(%22app.ear.exclusions%22);%0A%0A    if (earExclusions != null) %7B%0A      for (final String ed: earExclusions) %7B%0A        addExclusion(ed);%0A      %7D%0A    %7D%0A  %7D%0A%0A  public void addExclusion(final String exc) throws Throwable %7B%0A    final Element depNode = findElement(root, %22deployment%22);%0A    if (depNode == null) %7B%0A      utils.error(%22Cannot locate node deployment%22);%0A      return;%0A    %7D%0A%0A    Element excsNode = findElement(depNode, %22exclusions%22);%0A    if (excsNode == null) %7B%0A      excsNode = doc.createElement(%22exclusions%22);%0A      depNode.appendChild(excsNode);%0A    %7D%0A%0A    final Element mdlNode = doc.createElement(%22module%22);%0A    mdlNode.setAttribute(%22name%22, exc);%0A%0A    excsNode.appendChild(mdlNode);%0A%0A    updated = true;%0A  %7D%0A%7D%0A

Add jboss deployment structure fro wildfly