[jboss-jira] [JBoss JIRA] Created: (AS7-1646) Allow for MODULEPATH to effect the -mp standalone.sh/standalone.bat argument
Scott Stark (JIRA)
jira-events at lists.jboss.org
Wed Aug 24 23:20:17 EDT 2011
Allow for MODULEPATH to effect the -mp standalone.sh/standalone.bat argument
----------------------------------------------------------------------------
Key: AS7-1646
URL: https://issues.jboss.org/browse/AS7-1646
Project: Application Server 7
Issue Type: Feature Request
Components: Modules
Affects Versions: 7.0.1.Final, 7.0.0.Final
Reporter: Scott Stark
Assignee: Scott Stark
If one tries to override the bootstrap module path by providing a MODULEPATH environment variable, it is never consulted since the -mp argument set by the standalone.sh script is simply used as the value for the org.jboss.modules.Main module.path system property, overriding any existing value, and precluding any use of the MODULEPATH environment variable. There should be a way to set the module path used via a setting in the standalone.conf/standalone.conf.bat. The simplest would be to look for MODULEPATH and if not set, default to the current $JBOSS_HOME/modules value passed in as the -mp argument value:
--- a/build/src/main/resources/bin/standalone.sh
+++ b/build/src/main/resources/bin/standalone.sh
@@ -115,6 +115,10 @@ if $cygwin; then
JBOSS_ENDORSED_DIRS=`cygpath --path --windows "$JBOSS_ENDORSED_DIRS"`
fi
+if [ "x$MODULEPATH" = "x" ]; then
+ MODULEPATH="$JBOSS_HOME/modules"
+fi
+
# Display our environment
echo "=========================================================================
echo ""
@@ -136,7 +140,7 @@ while true; do
\"-Dorg.jboss.boot.log.file=$JBOSS_HOME/standalone/log/boot.log\" \
\"-Dlogging.configuration=file:$JBOSS_HOME/standalone/configuration/lo
-jar \"$JBOSS_HOME/jboss-modules.jar\" \
- -mp \"$JBOSS_HOME/modules\" \
+ -mp \"$MODULEPATH\" \
-logmodule "org.jboss.logmanager" \
-jaxpmodule javax.xml.jaxp-provider \
org.jboss.as.standalone \
@@ -149,7 +153,7 @@ while true; do
\"-Dorg.jboss.boot.log.file=$JBOSS_HOME/standalone/log/boot.log\" \
\"-Dlogging.configuration=file:$JBOSS_HOME/standalone/configuration/lo
-jar \"$JBOSS_HOME/jboss-modules.jar\" \
- -mp \"$JBOSS_HOME/modules\" \
+ -mp \"$MODULEPATH\" \
-logmodule "org.jboss.logmanager" \
-jaxpmodule javax.xml.jaxp-provider \
org.jboss.as.standalone \
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list