title: Module not excluded on Wildfly
body: <p>We want to exclude the <code>modules\system\layers\base\javax\servlet\jstl\api\main\jboss-jstl-api_1.2_spec-1.1.2.Final.jar</code> from our web application deployment (WAR file).</p>
  
  <p>Hence we have the following configuration in <code>src\main\webapp\WEB-INF\jboss-deployment-structure.xml</code>:</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='UTF-8'?&gt;
  &lt;jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2"&gt;
      &lt;deployment&gt;
          &lt;exclusions&gt;
              &lt;module name="javax.servlet.jstl.api"/&gt;
          &lt;/exclusions&gt;
          &lt;dependencies&gt;
              &lt;module name="deployment.my-dependencies.jar"/&gt;
          &lt;/dependencies&gt;
      &lt;/deployment&gt;
  &lt;/jboss-deployment-structure&gt;
  </code></pre>
  
  <p>In the Wildfly log I see that <code>my-dependencies.jar</code> is added as a <code>ModuleDependency</code>. But when searching for <code>javax.servlet.jstl.api</code> I only see this:</p>
  
  <blockquote>
    <p>2015-04-03 15:22:11,971 DEBUG [org.jboss.modules] (ServerService
    Thread Pool -- 12) Module javax.servlet.jstl.api:main defined by local
    module loader @1f7c9157 (finder: local module finder @2b29f6e7 (roots:
    C:\Users\me\Documents\wildfly-8.2.0.Final\modules,C:\Users\me\Documents\wildfly-8.2.0.Final\modules\system\layers\base))</p>
  </blockquote>
  
  <p>Why isn't the module excluded?</p>