System.out.println(" -mp <search path of directories>");
System.out.println(" A list of directories, separated by '" + File.pathSeparator + "', where modules may be located");
System.out.println(" If not specified, the value of the \"module.path\" system property is used");
So you could modify standalone.sh to include more directories
I think there is some system property that list all possible module "repositories".
Where by default it goes to JBOSS_HOME/modules.
But I'm not 100% ... :-)
Thanks, I'll probably use the standalone.sh -mp arg. I did get a chance to look at the code, and the -mp arg just sets the module.path system property as the help msg Kabir shows said. I did find that there is a MODULEPATH environment variable that is checked as well as the default value for the module.path system property, so that is another option.
Scott, which option did you go for in the end? I need to do something similar.
The problem of MODULEPATH is how to set it to something that works with relative folders and you have to add the $JBOSS_HOME/modules to it too.
Btw, seems like -mp is not an option of standalone.sh itself, but rather the internal main.
Btw, I'd rather not touch standalone.sh.
1 of 1 people found this helpful
If you do not want to modify standalone.sh/bat just set JBOSS_MODULEPATH env variable, and make sure that $JBOSS_HOME\modules
also make sure that what is the name of variable, it was changed from MODULE_PATH to MODULEPATH and is now JBOSS_MODULEPATH(7.1.0+) as other two ware clashing with some other sofware..
At least in 7.1.0.CR1b, that only really works if $JBOSS_HOME is set in advance, iow, if you go and set it explicitly. Otherwise, it won't work.
standalone.sh calculates where $JBOSS_HOME is without the need to specificy which is ideal, so the easiest thing here so far IMO is to go and modify standalone.sh directly and convert:
What we ended up doing in OpenShift is to set the JBOSS_MODULEPATH in our own version of standalone.conf. We do also have our own version of standalone.sh, so we are not relying on the distribution version.