How to specify absolute paths to jar files in the custom module's modules.xml in JBoss EAP 6.x/7.x?

Solution Verified - Updated -


  • We would like to specify absolute paths of jar files to <resource-root path="..."> in the module.xml of our custom module in JBoss EAP 6.x/7.x. Is this possible? For example:

    <?xml version="1.0" ?>
    <module xmlns="urn:jboss:module:1.1" name="com.example.custom.module">
            <resource-root path="/path/to/library/mylib.jar"/>
            <module name="javaee.api"/>
            <module name="javax.api"/>
  • Absolut path not working with modules. The JBoss EAP 7.2 configuration guide says I can use an absolute path within the module starting with JBoss EAP 7.1 (we are using JBoss EAP 7.2). I want to use the whole directory like we do already. Today in 7.0 we have:

    <?xml version="1.0" encoding="UTF-8"?>  
    <module xmlns="urn:jboss:module:1.0" name="com.example.configuration">
            <resource-root path="."/>

    That uses the current directory to find the property files that I need. I set up my new module like this (the module version(1.1) does not seem to matter):

    <?xml version="1.0" encoding="UTF-8"?>  
    <module xmlns="urn:jboss:module:1.1" name="com.example.configuration">
            <resource-root path="/path/to/config/ "/>

    The error I get shows it is appending the path above to the location of module.xml

    java.nio.file.NoSuchFileException: C:\jboss-eap-7.2\modules\com\example\configuration\main\path\to\config


  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x
    • 7.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In