title: JBoss: including subdirectories in Module Path
body: <p>I am using <code>JBoss EAP 6.4</code>. I have a modules folder that contains resources (configuration files needed by my application) and has the following file structure:</p>
  
  <pre><code>modules
      |
      |---resources
              |
              |---main
                  |
                  |---templates
                  |       |---template1.xml
                  |       |---template2.xml
                  |
                  |---axis2.xml
                  |---hibernate.cfg.xml
                  |---module.xml
  </code></pre>
  
  <p>My <code>module.xml</code> file looks like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;module xmlns="urn:jboss:module:1.1" name="resources"&gt;
      &lt;resources&gt;
          &lt;resource-root path="."/&gt;
          &lt;resource-root path="./templates"/&gt;
      &lt;/resources&gt;
  &lt;/module&gt;
  </code></pre>
  
  <p>I also have a <code>jboss-deployment-structure.xml</code> file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;jboss-deployment-structure&gt;
      &lt;deployment&gt;
          &lt;dependencies&gt;
              &lt;module name="resources" /&gt;
          &lt;/dependencies&gt;
      &lt;/deployment&gt;
  &lt;/jboss-deployment-structure&gt;
  </code></pre>
  
  <p>I put the modules folder in <code>JBOSS_MODULEPATH</code>. The application can find the XML files in <code>modules/resources/main</code> like <code>axis2.xml</code> and <code>hibernate.cfg.xml</code>. However, it can't find the files in the subdirectory <code>templates</code> like <code>template1.xml</code>.</p>
  
  <p>Any suggestions?</p>