diff --git a/jboss/container/maven/default/backward_compatibility.sh b/jboss/container/maven/default/backward_compatibility.sh index 6e7433fb..23c31956 100755 --- a/jboss/container/maven/default/backward_compatibility.sh +++ b/jboss/container/maven/default/backward_compatibility.sh @@ -1,10 +1,13 @@ #!/bin/sh # Configure module set -e - # For backward compatibility mkdir -p /usr/local/s2i -ln -s /opt/jboss/container/maven/default/scl-enable-maven /usr/local/s2i/scl-enable-maven -chown -h jboss:root /usr/local/s2i/scl-enable-maven +# scl-enable-maven is not needed on ubi8 images. +if test -r "${JBOSS_CONTAINER_MAVEN_DEFAULT_MODULE}/scl-enable-maven"; then + ln -s /opt/jboss/container/maven/default/scl-enable-maven /usr/local/s2i/scl-enable-maven + chown -h jboss:root /usr/local/s2i/scl-enable-maven +fi + ln -s /opt/jboss/container/maven/default/maven.sh /usr/local/s2i/common.sh chown -h jboss:root /usr/local/s2i/common.sh diff --git a/jboss/container/maven/default/configure.sh b/jboss/container/maven/default/configure.sh index afc29f8f..0ec803d3 100755 --- a/jboss/container/maven/default/configure.sh +++ b/jboss/container/maven/default/configure.sh @@ -18,7 +18,11 @@ popd MAVEN_VERSION_SQUASHED=${MAVEN_VERSION/./} # pull in specific maven version to serve as default -ln -s /opt/jboss/container/maven/${MAVEN_VERSION_SQUASHED}/* /opt/jboss/container/maven/default +for f in /opt/jboss/container/maven/${MAVEN_VERSION_SQUASHED}/*; do + if test -f "$f"; then + ln -s "$f" /opt/jboss/container/maven/default; + fi; +done chown -h jboss:root /opt/jboss/container/maven/default/* # install default settings.xml file in user home