<?xml version="1.0" encoding="UTF-8"?>
<assembly
  xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">

  <!-- Note: This works on jboss-as-web-7.0 and jboss-as-7.0 -->
  <id>EE6</id>
  <formats>
    <format>war</format>
  </formats>

  <includeBaseDirectory>false</includeBaseDirectory>

  <fileSets>
    <fileSet>
      <directory>${project.build.directory}/upacked-war</directory>
      <outputDirectory>/</outputDirectory>
      <excludes>
        <exclude>WEB-INF/classes/META-INF/persistence.xml</exclude>
        <exclude>WEB-INF/lib/netty-*.jar</exclude>

        <!-- possible signature info -->
        <exclude>META-INF/*.SF</exclude>
        <exclude>META-INF/*.RSA</exclude>

        <!-- hibernate 3 transitive deps -->
        <exclude>WEB-INF/lib/hibernate*.jar</exclude>
        <exclude>WEB-INF/lib/dom4j-*.jar</exclude>

        <!-- from dom4j -->
        <exclude>WEB-INF/lib/jaxen-*.jar</exclude>
        <exclude>WEB-INF/lib/jaxme-api-*.jar</exclude>
        <exclude>WEB-INF/lib/pull-parser-*.jar</exclude>
        <exclude>WEB-INF/lib/relaxngDatatype-*.jar</exclude>
        <exclude>WEB-INF/lib/stax-api-1.0.jar</exclude>
        <exclude>WEB-INF/lib/xml-apis-*.jar</exclude>
        <exclude>WEB-INF/lib/xpp3-*.jar</exclude>
        <exclude>WEB-INF/lib/xsdlib-*.jar</exclude>

        <!-- from jaxen -->
        <!-- <exclude>WEB-INF/lib/jdom-*.jar</exclude> needed by jbpm-workitems? -->
        <exclude>WEB-INF/lib/xercesImpl-*.jar</exclude>
        <exclude>WEB-INF/lib/xmlParserAPIs-*.jar</exclude>
        <exclude>WEB-INF/lib/xom-*.jar</exclude>

        <!-- from xom -->
        <exclude>WEB-INF/lib/icu4j-*.jar</exclude>
        <exclude>WEB-INF/lib/tagsoup-*.jar</exclude>
        <exclude>WEB-INF/lib/xalan-*.jar</exclude>

        <!-- from xalan -->
        <exclude>WEB-INF/lib/serializer-*.jar</exclude>
      </excludes>
    </fileSet>
  </fileSets>
  <files>
    <file>
      <source>src/main/assembly/resources/ht-persistence-JPA2.xml</source>
      <destName>WEB-INF/classes/META-INF/persistence.xml</destName>
    </file>
    <file>
      <source>src/main/assembly/resources/Taskorm-JPA2.xml</source>
      <destName>WEB-INF/classes/META-INF/Taskorm-JPA2.xml</destName>
    </file>
  </files>

</assembly>
