Skip to content

Commit

Permalink
[CLOUD-3387] Only run scl-enable-maven if present
Browse files Browse the repository at this point in the history
RHEL7-based images that use SCL to provide Maven need this in order
to have Maven available in the run environment (although I'd be
surprised if anyone actually used that)

Fixes GitHub jboss-openshift#354.

Signed-off-by: Jonathan Dowland <[email protected]>
  • Loading branch information
jmtd committed Sep 15, 2020
1 parent 8411125 commit 4f540e8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions jboss/container/java/s2i/bash/artifacts/usr/local/s2i/run
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ source "${JBOSS_CONTAINER_JAVA_S2I_MODULE}/s2i-core-hooks"
# Global S2I variable setup
s2i_core_env_init

# XXX: Not sure why we need to setup maven, but this was part of the old s2i-setup script, so...
source "${JBOSS_CONTAINER_MAVEN_DEFAULT_MODULE}/scl-enable-maven"
# CLOUD-3387: RHEL7-based images enable maven in the runtime environment. This
# is not needed for RHEL8-based images.
if test -r "${JBOSS_CONTAINER_MAVEN_DEFAULT_MODULE}/scl-enable-maven"; then
source "${JBOSS_CONTAINER_MAVEN_DEFAULT_MODULE}/scl-enable-maven"
fi

JAVA_OPTS="${JAVA_OPTS:-${JAVA_OPTIONS}}"
if [ -f "${JBOSS_CONTAINER_JOLOKIA_MODULE}/jolokia-opts" ]; then
Expand Down

0 comments on commit 4f540e8

Please sign in to comment.