How to specify absolute paths to jar files in the custom module's modules.xml in JBoss EAP 6.x/7.x?
Issue
-
We would like to specify absolute paths of jar files to
<resource-root path="...">
in themodule.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"> <resources> <resource-root path="/path/to/library/mylib.jar"/> </resources> <dependencies> <module name="javaee.api"/> <module name="javax.api"/> </dependencies> </module>
-
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"> <resources> <resource-root path="."/> </resources> </module>
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"> <resources> <resource-root path="/path/to/config/ "/> </resources> </module>
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
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.x
- 7.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.