0 Replies Latest reply on Aug 29, 2014 1:23 PM by davidj

    Adding module thru CLI with correct resource-root

    davidj

      I'm attempting to add a new module for JBoss 6.3 EAP using CLI.

      The instructions for doing that are given here: [AS7-4265] cli command to add/remove AS modules - JBoss Issue Tracker

       

      The reason I want a module is to contain a properties file which my WAR file can access.

       

      The command I'm using is:

      module add --name=com.mycompany.myproject.configuration --resources=myproperties.properties

       

      The above command works successfully.  It creates a new folder structure like this:

      <jboss-install-dir>/modules/com/mycompany/myproject/configuration/main

       

      Inside of the "main" folder there are two files:

      1) module.xml

      2) myproperties.properties

       

      The problem is: the WAR file cannot see the properties file.

      The reason is: inside the module.xml the "resource-root" value is not set to "."

       

      What additional parameters do I need to include in my CLI command to fix this?

       

      For reference, below is a copy of the module.xml file which the command creates:

      <?xml version="1.0" ?>

      <module xmlns="urn:jboss:module:1.1" name="com.mycompany.myproject.configuration">

            <resources>

                 <resource-root path="myproperties.properties"/> <!-- THIS IS THE LINE WHICH I NEED CHANGED. -->

            </resources>

      </module>

       

      But I need the resource-root line to read:

      <resource-root path="."/> <!-- THIS IS WHAT I NEED. -->

       

      Thanks,

       

      David