-
1. Re: How do you add a directory to the JBoss classpath
nickarls Jan 16, 2013 4:04 AM (in response to teknopaul)1 of 1 people found this helpfulI think you can have properties files outside the module jar according to https://community.jboss.org/wiki/HowToPutAnExternalFileInTheClasspath
-
2. Re: How do you add a directory to the JBoss classpath
teknopaul Jan 16, 2013 8:19 AM (in response to teknopaul)So answering my own question here based on that link and others.
To get
/etc/jboss
on the classpathcreate
/etc/jboss/module.xml
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="config">
<resources>
<resource-root path="."/>
</resources>
</module>
Symlink as follows
mkdir $JBOSS_HOME/modules/config
ln -s /etc/jboss $JBOSS_HOME/modules/config/main
(or for windows)
mklink /D %JBOSS_HOME%\modules\config\main \etc\jboss
Add
<subsystem xmlns="urn:jboss:domain:ee:1.0" > <global-modules> <module name="config" /> </global-modules> </subsystem>
to all
standalone.xml
files.Now you can add any config files to
/etc/jboss
and it appears on the classpath or any WAR deployed without having to edit the WAR. -
3. Re: How do you add a directory to the JBoss classpath
teknopaul Jan 16, 2013 9:02 AM (in response to teknopaul)2 of 2 people found this helpfulTo restore
server/default/conf
functionality, using standalone as an example...create
$JBOSS_HOME/standalone/conf/module.xml
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="standalone.conf">
<resources>
<resource-root path="."/>
</resources>
</module>
symlink as follows
mkdir -p $JBOSS_HOME/modules/standalone/conf
ln -s $JBOSS_HOME/standalone/conf $JBOSS_HOME/modules/standalone/conf/main
(or for windows)
mklink /D %JBOSS_HOME%\modules\standalone\conf\main %JBOSS_HOME%\standalone\conf
Add
<subsystem xmlns="urn:jboss:domain:ee:1.0" >
<global-modules>
<module name="standalone.conf" />
</global-modules>
</subsystem>
to
$JBOSS_HOME/standalone/standalone.xml
Now you can add any files to
standalone/conf
and they appear on the servers classpath.