Skip to content

Commit e84cc6d

Browse files
jhuttanajmtd
authored andcommitted
Address review comments
Signed-off-by: Jayashree Huttanagoudar <[email protected]>
1 parent 2a0c7b1 commit e84cc6d

File tree

1 file changed

+8
-5
lines changed
  • modules/run/artifacts/opt/jboss/container/java/run

1 file changed

+8
-5
lines changed

modules/run/artifacts/opt/jboss/container/java/run/run-java.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ export JBOSS_CONTAINER_UTIL_LOGGING_MODULE="/opt/jboss/container/util/logging"
88
export JBOSS_CONTAINER_JAVA_RUN_MODULE="/opt/jboss/container/java/run"
99

1010
#This is moved here after deleting run-env.sh
11-
export JAVA_APP_DIR=/deployments
11+
# Default the application dir to the S2I deployment dir
12+
if [ -z "$JAVA_APP_DIR" ]
13+
then JAVA_APP_DIR=/deployments
14+
fi
1215

1316
source "$JBOSS_CONTAINER_UTIL_LOGGING_MODULE/logging.sh"
1417

@@ -100,12 +103,12 @@ load_env() {
100103

101104
# Check also $JAVA_APP_DIR. Overrides other defaults
102105
# It's valid to set the app dir in the default script
103-
if [ -z "${JAVA_APP_DIR}" ]; then
104-
# XXX: is this correct? This is defaulted above to /deployments. Should we
105-
# define a default to the old /opt/java-run?
106-
export JAVA_APP_DIR="${JBOSS_CONTAINER_JAVA_RUN_MODULE}"
106+
if [ -f "${JAVA_APP_DIR}/${run_env_sh}" ]; then
107+
source "${JAVA_APP_DIR}/${run_env_sh}"
107108
fi
108109

110+
export JAVA_APP_DIR
111+
109112
# JAVA_LIB_DIR defaults to JAVA_APP_DIR
110113
export JAVA_LIB_DIR="${JAVA_LIB_DIR:-${JAVA_APP_DIR}}"
111114
if [ -z "${JAVA_MAIN_CLASS}" ] && [ -z "${JAVA_APP_JAR}" ]; then

0 commit comments

Comments
 (0)