diff --git a/jboss-maven/module.yaml b/jboss-maven/module.yaml
index a24f6b88..e12fe9e2 100644
--- a/jboss-maven/module.yaml
+++ b/jboss-maven/module.yaml
@@ -5,5 +5,5 @@ description: Legacy Maven module
modules:
install:
- - name: jboss.container.maven.default.bash
+ - name: jboss.container.maven.default
diff --git a/jboss/container/java/s2i/bash/module.yaml b/jboss/container/java/s2i/bash/module.yaml
index b7f02b5f..317ee8cd 100644
--- a/jboss/container/java/s2i/bash/module.yaml
+++ b/jboss/container/java/s2i/bash/module.yaml
@@ -14,7 +14,7 @@ execute:
modules:
install:
- - name: jboss.container.maven.s2i.bash
+ - name: jboss.container.maven.s2i
- name: jboss.container.java.run.bash
- name: jboss.container.jolokia
- name: jboss.container.prometheus
diff --git a/jboss/container/jws/s2i/bash/module.yaml b/jboss/container/jws/s2i/bash/module.yaml
index 01ca6d7f..614f4e89 100644
--- a/jboss/container/jws/s2i/bash/module.yaml
+++ b/jboss/container/jws/s2i/bash/module.yaml
@@ -14,5 +14,5 @@ execute:
modules:
install:
- - name: jboss.container.maven.s2i.bash
+ - name: jboss.container.maven.s2i
- name: jboss.container.util.logging.bash
diff --git a/jboss/container/maven/35/35scl/artifacts/opt/jboss/container/maven/35/scl-enable-maven b/jboss/container/maven/7.0.3.5/artifacts/opt/jboss/container/maven/35/scl-enable-maven
similarity index 100%
rename from jboss/container/maven/35/35scl/artifacts/opt/jboss/container/maven/35/scl-enable-maven
rename to jboss/container/maven/7.0.3.5/artifacts/opt/jboss/container/maven/35/scl-enable-maven
diff --git a/jboss/container/maven/35/35scl/configure.sh b/jboss/container/maven/7.0.3.5/configure.sh
similarity index 100%
rename from jboss/container/maven/35/35scl/configure.sh
rename to jboss/container/maven/7.0.3.5/configure.sh
diff --git a/jboss/container/maven/35/35scl/module.yaml b/jboss/container/maven/7.0.3.5/module.yaml
similarity index 86%
rename from jboss/container/maven/35/35scl/module.yaml
rename to jboss/container/maven/7.0.3.5/module.yaml
index f9b5e562..5f0b575b 100644
--- a/jboss/container/maven/35/35scl/module.yaml
+++ b/jboss/container/maven/7.0.3.5/module.yaml
@@ -1,6 +1,6 @@
schema_version: 1
-name: jboss.container.maven.35.bash
-version: '3.5scl'
+name: jboss.container.maven
+version: '7.0.3.5'
description: Provides Maven v3.5 capabilities to an image via SCL
labels:
diff --git a/jboss/container/maven/36/36scl/artifacts/opt/jboss/container/maven/36/scl-enable-maven b/jboss/container/maven/7.0.3.6/artifacts/opt/jboss/container/maven/36/scl-enable-maven
similarity index 100%
rename from jboss/container/maven/36/36scl/artifacts/opt/jboss/container/maven/36/scl-enable-maven
rename to jboss/container/maven/7.0.3.6/artifacts/opt/jboss/container/maven/36/scl-enable-maven
diff --git a/jboss/container/maven/36/36scl/configure.sh b/jboss/container/maven/7.0.3.6/configure.sh
similarity index 100%
rename from jboss/container/maven/36/36scl/configure.sh
rename to jboss/container/maven/7.0.3.6/configure.sh
diff --git a/jboss/container/maven/36/36scl/module.yaml b/jboss/container/maven/7.0.3.6/module.yaml
similarity index 86%
rename from jboss/container/maven/36/36scl/module.yaml
rename to jboss/container/maven/7.0.3.6/module.yaml
index 3a37c1ea..f449de20 100644
--- a/jboss/container/maven/36/36scl/module.yaml
+++ b/jboss/container/maven/7.0.3.6/module.yaml
@@ -1,6 +1,6 @@
schema_version: 1
-name: jboss.container.maven.36.bash
-version: '3.6scl'
+name: jboss.container.maven
+version: '7.0.3.6'
description: Provides Maven v3.6 capabilities to an image via SCL
labels:
diff --git a/jboss/container/maven/35/default/module.yaml b/jboss/container/maven/8.0.3.5/module.yaml
similarity index 85%
rename from jboss/container/maven/35/default/module.yaml
rename to jboss/container/maven/8.0.3.5/module.yaml
index 35d3c0c8..ee31ce86 100644
--- a/jboss/container/maven/35/default/module.yaml
+++ b/jboss/container/maven/8.0.3.5/module.yaml
@@ -1,6 +1,6 @@
schema_version: 1
-name: jboss.container.maven.35.bash
-version: '3.5'
+name: jboss.container.maven
+version: '8.0.3.5'
description: Provides Maven v3.5 capabilities to an image.
labels:
diff --git a/jboss/container/maven/8.2.3.6.8/configure.sh b/jboss/container/maven/8.2.3.6.8/configure.sh
new file mode 100755
index 00000000..ea5e2af0
--- /dev/null
+++ b/jboss/container/maven/8.2.3.6.8/configure.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+set -e
+
+dnf module enable -y maven:3.6
+dnf install -y --setopt=tsflags=nodocs maven-openjdk8
+dnf clean all
diff --git a/jboss/container/maven/8.2.3.6.8/module.yaml b/jboss/container/maven/8.2.3.6.8/module.yaml
new file mode 100644
index 00000000..7eb30794
--- /dev/null
+++ b/jboss/container/maven/8.2.3.6.8/module.yaml
@@ -0,0 +1,18 @@
+schema_version: 1
+name: jboss.container.maven
+# Version scheme: RHEL major . RHEL minor . Maven major . Maven minor . JDK version
+version: '8.2.3.6.8'
+description: Provides Maven v3.6 capabilities to an image.
+
+labels:
+- name: io.fabric8.s2i.version.maven
+ value: "3.6"
+
+envs:
+- name: JBOSS_CONTAINER_MAVEN_36_MODULE
+ value: /opt/jboss/container/maven/36/
+- name: MAVEN_VERSION
+ value: "3.6"
+
+execute:
+- script: configure.sh
diff --git a/jboss/container/maven/36/default/configure.sh b/jboss/container/maven/8.2.3.6/configure.sh
similarity index 100%
rename from jboss/container/maven/36/default/configure.sh
rename to jboss/container/maven/8.2.3.6/configure.sh
diff --git a/jboss/container/maven/36/default/module.yaml b/jboss/container/maven/8.2.3.6/module.yaml
similarity index 85%
rename from jboss/container/maven/36/default/module.yaml
rename to jboss/container/maven/8.2.3.6/module.yaml
index 6f3d1545..f9532919 100644
--- a/jboss/container/maven/36/default/module.yaml
+++ b/jboss/container/maven/8.2.3.6/module.yaml
@@ -1,6 +1,6 @@
schema_version: 1
-name: jboss.container.maven.36.bash
-version: '3.6'
+name: jboss.container.maven
+version: '8.2.3.6'
description: Provides Maven v3.6 capabilities to an image.
labels:
diff --git a/jboss/container/maven/default/bash/36/artifacts/opt/jboss/container/maven/default/jboss-settings.xml b/jboss/container/maven/default/artifacts/opt/jboss/container/maven/default/jboss-settings.xml
similarity index 100%
rename from jboss/container/maven/default/bash/36/artifacts/opt/jboss/container/maven/default/jboss-settings.xml
rename to jboss/container/maven/default/artifacts/opt/jboss/container/maven/default/jboss-settings.xml
diff --git a/jboss/container/maven/default/bash/36/artifacts/opt/jboss/container/maven/default/maven.sh b/jboss/container/maven/default/artifacts/opt/jboss/container/maven/default/maven.sh
similarity index 100%
rename from jboss/container/maven/default/bash/36/artifacts/opt/jboss/container/maven/default/maven.sh
rename to jboss/container/maven/default/artifacts/opt/jboss/container/maven/default/maven.sh
diff --git a/jboss/container/maven/default/bash/36/backward_compatibility.sh b/jboss/container/maven/default/backward_compatibility.sh
old mode 100644
new mode 100755
similarity index 100%
rename from jboss/container/maven/default/bash/36/backward_compatibility.sh
rename to jboss/container/maven/default/backward_compatibility.sh
diff --git a/jboss/container/maven/default/bash/default/artifacts/opt/jboss/container/maven/default/jboss-settings.xml b/jboss/container/maven/default/bash/default/artifacts/opt/jboss/container/maven/default/jboss-settings.xml
deleted file mode 100644
index e017f0b5..00000000
--- a/jboss/container/maven/default/bash/default/artifacts/opt/jboss/container/maven/default/jboss-settings.xml
+++ /dev/null
@@ -1,283 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- jboss-eap-repository
-
-
- com.redhat.xpaas.repo.redhatga
-
-
-
-
-
- redhat-ga-repository
- https://maven.repository.redhat.com/ga/
-
- true
-
-
- false
-
-
-
- redhat-ea-repository
- https://maven.repository.redhat.com/earlyaccess/all/
-
- true
-
-
- false
-
-
-
- jboss-eap-repository
- https://maven.repository.redhat.com/techpreview/all
-
- true
-
-
- false
-
-
-
-
-
- redhat-ga-plugin-repository
- https://maven.repository.redhat.com/ga/
-
- true
-
-
- false
-
-
-
- redhat-ea-plugin-repository
- https://maven.repository.redhat.com/earlyaccess/all/
-
- true
-
-
- false
-
-
-
- jboss-eap-plugin-repository
- https://maven.repository.redhat.com/techpreview/all
-
- true
-
-
- false
-
-
-
-
-
-
-
- jboss-eap-repository-insecure
-
-
- redhat-ga-repository
- http://maven.repository.redhat.com/ga/
-
- true
-
-
- false
-
-
-
- redhat-ea-repository
- http://maven.repository.redhat.com/earlyaccess/all/
-
- true
-
-
- false
-
-
-
- jboss-eap-repository
- http://maven.repository.redhat.com/techpreview/all
-
- true
-
-
- false
-
-
-
-
-
- redhat-ga-plugin-repository
- http://maven.repository.redhat.com/ga/
-
- true
-
-
- false
-
-
-
- redhat-ea-plugin-repository
- http://maven.repository.redhat.com/earlyaccess/all/
-
- true
-
-
- false
-
-
-
- jboss-eap-plugin-repository
- http://maven.repository.redhat.com/techpreview/all
-
- true
-
-
- false
-
-
-
-
-
-
-
- jboss-community-repository
-
-
- com.redhat.xpaas.repo.jbossorg
-
-
-
-
-
- jboss-community-repository
- https://repository.jboss.org/nexus/content/groups/public/
-
- true
-
-
- false
-
-
-
-
-
- jboss-community-plugin-repository
- https://repository.jboss.org/nexus/content/groups/public/
-
- true
-
-
- false
-
-
-
-
-
-
-
- jboss-community-repository-insecure
-
-
- jboss-community-repository
- http://repository.jboss.org/nexus/content/groups/public/
-
- true
-
-
- false
-
-
-
-
-
- jboss-community-plugin-repository
- http://repository.jboss.org/nexus/content/groups/public/
-
- true
-
-
- false
-
-
-
-
-
-
-
- securecentral
-
-
- central
- https://repo1.maven.org/maven2
-
- true
-
-
-
-
-
- central
- https://repo1.maven.org/maven2
-
- true
-
-
-
-
-
-
-
- insecurecentral
-
-
- central
- http://repo1.maven.org/maven2
-
- true
-
-
-
-
-
- central
- http://repo1.maven.org/maven2
-
- true
-
-
-
-
-
-
-
-
-
- securecentral
-
-
-
diff --git a/jboss/container/maven/default/bash/default/artifacts/opt/jboss/container/maven/default/maven.sh b/jboss/container/maven/default/bash/default/artifacts/opt/jboss/container/maven/default/maven.sh
deleted file mode 100644
index 24284ff5..00000000
--- a/jboss/container/maven/default/bash/default/artifacts/opt/jboss/container/maven/default/maven.sh
+++ /dev/null
@@ -1,459 +0,0 @@
-# common shell routines for use with maven
-source "$JBOSS_CONTAINER_UTIL_LOGGING_MODULE/logging.sh"
-
-# default settings.xml file
-__JBOSS_MAVEN_DEFAULT_SETTINGS_FILE="${HOME}/.m2/settings.xml"
-
-# initialize maven
-function maven_init() {
- maven_init_vars
- maven_init_settings
- maven_init_local_repo
-}
-
-# initialize maven variables
-function maven_init_vars() {
- maven_init_var_MAVEN_LOCAL_REPO
- maven_init_var_MAVEN_SETTINGS_XML
- maven_init_var_MAVEN_OPTS
- maven_init_var_MAVEN_ARGS
-
- maven_init_backward_compatibility
-}
-
-# initialize old variables in case anybody is still using them
-function maven_init_backward_compatibility() {
- export MAVEN_REPO_LOCAL="$MAVEN_LOCAL_REPO"
-}
-
-function maven_init_var_MAVEN_LOCAL_REPO() {
- MAVEN_LOCAL_REPO="${MAVEN_LOCAL_REPO:-${MAVEN_REPO_LOCAL:-${HOME}/.m2/repository}}"
-}
-
-function maven_init_var_MAVEN_SETTINGS_XML() {
- if [ -f "${MAVEN_SETTINGS_XML}" ]; then
- :
- elif [ -f "${HOME}/.m2/settings.xml" ]; then
- MAVEN_SETTINGS_XML="${HOME}/.m2/settings.xml"
- else
- MAVEN_SETTINGS_XML="${JBOSS_CONTAINER_MAVEN_DEFAULT_MODULE}/jboss-settings.xml"
- fi
-}
-
-function maven_init_var_MAVEN_OPTS() {
- export MAVEN_OPTS="${MAVEN_OPTS:-$(${JBOSS_CONTAINER_JAVA_JVM_MODULE}/java-default-options)}"
-}
-
-function maven_init_var_MAVEN_ARGS() {
- MAVEN_ARGS=${MAVEN_ARGS:--e -Popenshift -DskipTests -Dcom.redhat.xpaas.repo.redhatga -Dfabric8.skip=true}
- # Use maven batch mode (CLOUD-579)
- # Always force IPv4 (CLOUD-188)
- MAVEN_ARGS="$MAVEN_ARGS --batch-mode -Djava.net.preferIPv4Stack=true"
- # manually configure settings (to simplify using custom settings vs default)
- MAVEN_ARGS="$MAVEN_ARGS -s ${MAVEN_SETTINGS_XML}"
- # manually configure local repository (to simplify configuration of custom vs default)
- MAVEN_ARGS="$MAVEN_ARGS -Dmaven.repo.local=${MAVEN_LOCAL_REPO}"
-
- # Append user-supplied arguments (CLOUD-412)
- MAVEN_ARGS="$MAVEN_ARGS ${MAVEN_ARGS_APPEND}"
-}
-
-function maven_init_settings() {
- process_maven_settings_xml "${MAVEN_SETTINGS_XML}"
-}
-
-function maven_init_local_repo() {
- :
-}
-
-# perform a maven build
-# $1 build directory; defaults to cwd
-# $2 goals to execute; defaults to package
-# e.g. cd $1; mvn $2
-function maven_build() {
- local build_dir=${1:-$(cwd)}
- local goals=${2:-package}
- log_info "Performing Maven build in $build_dir"
-
- pushd $build_dir &> /dev/null
-
- log_info "Using MAVEN_OPTS ${MAVEN_OPTS}"
- log_info "Using $(mvn $MAVEN_ARGS --version)"
- log_info "Running 'mvn $MAVEN_ARGS $goals'"
- # Execute the actual build
- mvn $MAVEN_ARGS $goals
-
- popd &> /dev/null
-
-}
-
-# post build cleanup. deletes local repository after a build, if MAVEN_CLEAR_REPO is set
-function maven_cleanup() {
- # Remove repo if desired
- if [ "${MAVEN_CLEAR_REPO,,}" == "true" -a -n "$(find ${MAVEN_LOCAL_REPO} -maxdepth 0 -type d ! -empty 2> /dev/null)" ]; then
- log_info "Clearing local maven repository at ${MAVEN_LOCAL_REPO}"
- rm -rf "${MAVEN_LOCAL_REPO}"
- if [ $? -ne 0 ]; then
- log_error "Cannot remove local Maven repository ${MAVEN_LOCAL_REPO}"
- fi
- fi
-}
-
-# apply environment to settings.xml file
-function process_maven_settings_xml() {
- local settings="${1:-${__JBOSS_MAVEN_DEFAULT_SETTINGS_FILE}}"
- add_maven_proxy_settings "${settings}"
- add_maven_mirrors "${settings}"
- add_maven_repos "${settings}"
-}
-
-# add proxy configuration to settings.xml
-# internal function, use process_maven_settings_xml which applies all configuration
-function add_maven_proxy_settings() {
- local httpsProxy="${https_proxy:-${HTTPS_PROXY}}"
- local httpProxy="${http_proxy:-${HTTP_PROXY}}"
- local settings="$1"
-
- if [ -n "${httpsProxy}" ] ; then
- source "$JBOSS_CONTAINER_JAVA_PROXY_MODULE"/parse-proxy-url.sh "${httpsProxy}" https 443
- else
- if [ -n "${httpProxy}" ] ; then
- source "$JBOSS_CONTAINER_JAVA_PROXY_MODULE"/parse-proxy-url.sh "${httpProxy}" http 80
- fi
- fi
- _add_maven_proxy "${settings}"
-}
-
-# insert settings for HTTP proxy into settings.xml if supplied as
-# separate variables JAVA_PROXY_HOST, _PORT, _SCHEME, _USERNAME,
-# _PASSWORD, _NONPROXYHOSTS
-# internal function
-function _add_maven_proxy() {
- local settings="${1:-${__JBOSS_MAVEN_DEFAULT_SETTINGS_FILE}}"
- if [ -n "$JAVA_PROXY_HOST" -a -n "$JAVA_PROXY_PORT" ]; then
- xml="\
- genproxy\
- true\
- ${JAVA_PROXY_SCHEME:-http}\
- $JAVA_PROXY_HOST\
- $JAVA_PROXY_PORT"
- if [ -n "$JAVA_PROXY_USERNAME" -a -n "$JAVA_PROXY_PASSWORD" ]; then
- xml="$xml\
- $JAVA_PROXY_USERNAME\
- $JAVA_PROXY_PASSWORD"
- fi
- source "$JBOSS_CONTAINER_JAVA_PROXY_MODULE"/translate-no-proxy.sh
- if [ -n "$JAVA_PROXY_NONPROXYHOSTS" ]; then
- xml="$xml\
- $JAVA_PROXY_NONPROXYHOSTS"
- fi
- xml="$xml\
- "
- local sub=""
- sed -i "s^${sub}^${xml}^" "$settings"
- fi
-}
-
-# Finds the environment variable and returns its value if found.
-# Otherwise returns the default value if provided.
-#
-# Arguments:
-# $1 env variable name to check
-# $2 default value if environment variable was not set
-function _maven_find_env() {
- local var=${!1}
- echo "${var:-$2}"
-}
-
-# Finds the environment variable with the given prefix. If not found
-# the default value will be returned. If no prefix is provided will
-# rely on _maven_find_env
-#
-# Arguments
-# - $1 prefix. Transformed to uppercase and replace - by _
-# - $2 variable name. Prepended by "prefix_"
-# - $3 default value if the variable is not defined
-function _maven_find_prefixed_env() {
- local prefix=$1
-
- if [[ -z $prefix ]]; then
- _maven_find_env $2 $3
- else
- prefix=${prefix^^} # uppercase
- prefix=${prefix//-/_} #replace - by _
-
- local var_name=$prefix"_"$2
- echo ${!var_name:-$3}
- fi
-}
-# insert settings for mirrors/repository managers into settings.xml if supplied
-# internal function, use process_maven_settings_xml which applies all configuration
-function add_maven_mirrors() {
- local settings="${1:-${__JBOSS_MAVEN_DEFAULT_SETTINGS_FILE}}"
- local counter=1
-
- # Be backwards compatible
- if [ -n "${MAVEN_MIRROR_URL}" ]; then
- local mirror_id=$(_maven_find_env "MAVEN_MIRROR_ID" "mirror.default")
- local mirror_of=$(_maven_find_env "MAVEN_MIRROR_OF" "external:*")
-
- _add_maven_mirror "${settings}" "${mirror_id}" "${MAVEN_MIRROR_URL}" "${mirror_of}"
- fi
-
- IFS=',' read -a maven_mirror_prefixes <<< ${MAVEN_MIRRORS}
- for maven_mirror_prefix in ${maven_mirror_prefixes[@]}; do
- local mirror_id=$(_maven_find_prefixed_env "${maven_mirror_prefix}" "MAVEN_MIRROR_ID" "mirror${counter}")
- local mirror_url=$(_maven_find_prefixed_env "${maven_mirror_prefix}" "MAVEN_MIRROR_URL")
- local mirror_of=$(_maven_find_prefixed_env "${maven_mirror_prefix}" "MAVEN_MIRROR_OF" "external:*")
-
- if [ -z "${mirror_url}" ]; then
- log_warning "Variable \"${maven_mirror_prefix}_MAVEN_MIRROR_URL\" not set. Skipping maven mirror setup for the prefix \"${maven_mirror_prefix}\"."
- else
- _add_maven_mirror "${settings}" "${mirror_id}" "${mirror_url}" "${mirror_of}"
- fi
-
- counter=$((counter+1))
- done
-}
-
-# private
-function _add_maven_mirror() {
- local settings="${1}"
- local mirror_id="${2}"
- local mirror_url="${3}"
- local mirror_of="${4}"
-
- local xml="\n\
- ${mirror_id}\n\
- ${mirror_url}\n\
- ${mirror_of}\n\
- \n\
- "
-
- sed -i "s||$xml|" "${settings}"
-
-}
-
-function add_maven_repos() {
- local settings="${1}"
-
- # set the local repository
- local local_repo_xml="\n\
- ${MAVEN_LOCAL_REPO}"
- sed -i "s||${local_repo_xml}|" "${settings}"
-
- # single remote repository scenario: respect fully qualified url if specified, otherwise find and use service
- local single_repo_url="${MAVEN_REPO_URL}"
- if [ -n "$single_repo_url" ]; then
- local single_repo_id=$(_maven_find_env "MAVEN_REPO_ID" "repo-$(_generate_random_id)")
- add_maven_repo "$settings" "$single_repo_url" "$single_repo_id"
- fi
-
- # multiple remote repositories scenario: respect fully qualified url(s) if specified, otherwise find and use service(s); can be used together with "single repo scenario" above
- local multi_repo_counter=1
- IFS=',' read -a multi_repo_prefixes <<< ${MAVEN_REPOS}
- for multi_repo_prefix in ${multi_repo_prefixes[@]}; do
- local multi_repo_url=$(_maven_find_prefixed_env "${multi_repo_prefix}" "MAVEN_REPO_URL")
- local multi_repo_id=$(_maven_find_prefixed_env "${multi_repo_prefix}" "MAVEN_REPO_ID" "repo${multi_repo_counter}-$(_generate_random_id)")
- add_maven_repo "$settings" "$multi_repo_url" "$multi_repo_id" "$multi_repo_prefix"
- multi_repo_counter=$((multi_repo_counter+1))
- done
-}
-
-function add_maven_repo() {
- local settings=$1
- local repo_url=$2
- local repo_id=$3
- if [[ -z $4 ]]; then
- local prefix="MAVEN"
- else
- local prefix="${4}_MAVEN"
- fi
-
- if [[ -z ${repo_url} ]]; then
- local repo_service=$(_maven_find_prefixed_env "${prefix}" "REPO_SERVICE")
- # host
- local repo_host=$(_maven_find_prefixed_env "${prefix}" "REPO_HOST")
- if [[ -z ${repo_host} ]]; then
- repo_host=$(_maven_find_prefixed_env "${repo_service}" "SERVICE_HOST")
- fi
- if [[ ! -z ${repo_host} ]]; then
- # protocol
- local repo_protocol=$(_maven_find_prefixed_env "${prefix}" "REPO_PROTOCOL" "http")
- # port
- local repo_port=$(_maven_find_prefixed_env "${prefix}" "REPO_PORT")
- if [ "${repo_port}" = "" ]; then
- repo_port=$(_maven_find_prefixed_env "${repo_service}" "SERVICE_PORT" "8080")
- fi
- local repo_path=$(_maven_find_prefixed_env "${prefix}" "REPO_PATH")
- # strip leading slash if exists
- if [[ "${repo_path}" =~ ^/ ]]; then
- repo_path="${repo_path:1:${#repo_path}}"
- fi
- # url
- repo_url="${repo_protocol}://${repo_host}:${repo_port}/${repo_path}"
- fi
- fi
- if [[ ! -z ${repo_url} ]]; then
- _add_maven_repo_profile "${settings}" "${repo_id}" "${repo_url}" "${prefix}"
- _add_maven_repo_server "${settings}" "${repo_id}" "${prefix}"
- else
- log_warning "Variable \"${prefix}_REPO_URL\" not set. Skipping maven repo setup for the prefix \"${prefix}\"."
- fi
-}
-
-# private
-function _add_maven_repo_profile() {
- local settings=$1
- local repo_id=$2
- local url=$3
- local prefix=$4
-
- local name=$(_maven_find_prefixed_env "${prefix}" "REPO_NAME" "${repo_id}")
- local layout=$(_maven_find_prefixed_env "${prefix}" "REPO_LAYOUT" "default")
- local releases_enabled=$(_maven_find_prefixed_env "${prefix}" "REPO_RELEASES_ENABLED" "true")
- local releases_update_policy=$(_maven_find_prefixed_env "${prefix}" "REPO_RELEASES_UPDATE_POLICY" "always")
- local releases_checksum_policy=$(_maven_find_prefixed_env "${prefix}" "REPO_RELEASES_CHECKSUM_POLICY" "warn")
- local snapshots_enabled=$(_maven_find_prefixed_env "${prefix}" "REPO_SNAPSHOTS_ENABLED" "true")
- local snapshots_update_policy=$(_maven_find_prefixed_env "${prefix}" "REPO_SNAPSHOTS_UPDATE_POLICY" "always")
- local snapshots_checksum_policy=$(_maven_find_prefixed_env "${prefix}" "REPO_SNAPSHOTS_CHECKSUM_POLICY" "warn")
-
- # configure the repository in a profile
- local profile_id="${repo_id}-profile"
- local xml="\n\
- \n\
- ${profile_id}\n\
- \n\
- \n\
- ${repo_id}\n\
- ${name}\n\
- ${url}\n\
- ${layout}\n\
- \n\
- ${releases_enabled}\n\
- ${releases_update_policy}\n\
- ${releases_checksum_policy}\n\
- \n\
- \n\
- ${snapshots_enabled}\n\
- ${snapshots_update_policy}\n\
- ${snapshots_checksum_policy}\n\
- \n\
- \n\
- \n\
- \n\
- "
- sed -i "s||${xml}|" "${settings}"
-
- # activate the configured profile
- xml="\n\
- ${profile_id}\n\
- "
- sed -i "s||${xml}|" "${settings}"
-}
-
-# private
-function _add_maven_repo_server() {
- local settings=$1
- local server_id=$2
- local prefix=$3
-
- local username=$(_maven_find_prefixed_env "$prefix" "REPO_USERNAME")
- local password=$(_maven_find_prefixed_env "$prefix" "REPO_PASSWORD")
- local private_key=$(_maven_find_prefixed_env "$prefix" "REPO_PRIVATE_KEY")
- local passphrase=$(_maven_find_prefixed_env "$prefix" "REPO_PASSPHRASE")
- local file_permissions=$(_maven_find_prefixed_env "$prefix" "REPO_FILE_PERMISSIONS")
- local directory_permissions=$(_maven_find_prefixed_env "$prefix" "REPO_DIRECTORY_PERMISSIONS")
-
- local xml="\n\
- \n\
- ${server_id}"
- if [ "${username}" != "" -a "${password}" != "" ]; then
- xml="${xml}\n\
- ${username}\n\
- "
- fi
- if [ "${private_key}" != "" -a "${passphrase}" != "" ]; then
- xml="${xml}\n\
- ${private_key}\n\
- "
- fi
- if [ "${file_permissions}" != "" ]; then
- xml="${xml}\n\
- ${file_permissions}"
- fi
- if [ "${directory_permissions}" != "" ]; then
- xml="${xml}\n\
- ${directory_permissions}"
- fi
- xml="${xml}\n\
- \n\
- "
- sed -i "s||${xml}|" "${settings}"
-}
-
-# private
-function _generate_random_id() {
- cat /dev/urandom | env LC_CTYPE=C tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1
-}
-
-# The following functions are deprecated and provided solely for backward compatibility
-function configure_proxy() {
- add_maven_proxy_settings $@
-}
-
-function configure_mirrors() {
- add_maven_mirrors $@
-}
-
-# copy all artifacts of types, specified as the second up to n-th
-# argument of the routine into the $DEPLOY_DIR directory
-# Requires: source directory expressed in the form of absolute path!
-function copy_artifacts() {
- local dir=$1
- local types=
- shift
- while [ $# -gt 0 ]; do
- types="$types;$1"
- shift
- done
-
- for d in $(echo $dir | tr "," "\n")
- do
- shift
- local regex="^\/"
- if [[ ! "$d" =~ $regex ]]; then
- log_error "$FUNCNAME: Absolute path required for source directory \"$d\"!"
- exit 1
- fi
- for t in $(echo $types | tr ";" "\n")
- do
- log_info "Copying all $t artifacts from $d directory into $DEPLOY_DIR for later deployment..."
- cp -rfv $d/*.$t $DEPLOY_DIR 2> /dev/null
- done
- done
-}
-
-# handle incremental builds. If we have been passed build artifacts, untar
-# them over the supplied source.
-function manage_incremental_build() {
- if [ -d /tmp/artifacts ]; then
- log_info "Expanding artifacts from incremental build..."
- ( cd /tmp/artifacts && tar cf - . ) | ( cd ${HOME} && tar xvf - )
- rm -rf /tmp/artifacts
- fi
-}
-
-# s2i 'save-artifacts' routine
-function s2i_save_build_artifacts() {
- cd ${HOME}
- tar cf - .m2
-}
-
-# optionally clear the local maven repository after the build
-function clear_maven_repository() {
- mcr=$(echo "${MAVEN_CLEAR_REPO}" | tr [:upper:] [:lower:])
- if [ "${mcr}" = "true" ]; then
- rm -rf ${HOME}/.m2/repository/*
- fi
-}
diff --git a/jboss/container/maven/default/bash/default/backward_compatibility.sh b/jboss/container/maven/default/bash/default/backward_compatibility.sh
deleted file mode 100644
index 6e7433fb..00000000
--- a/jboss/container/maven/default/bash/default/backward_compatibility.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/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
-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/bash/default/configure.sh b/jboss/container/maven/default/bash/default/configure.sh
deleted file mode 100755
index e8007aa3..00000000
--- a/jboss/container/maven/default/bash/default/configure.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-# Configure module
-set -e
-
-SCRIPT_DIR=$(dirname $0)
-ARTIFACTS_DIR=${SCRIPT_DIR}/artifacts
-
-# configure artifact permissions
-chown -R jboss:root $ARTIFACTS_DIR
-chmod -R ug+rwX $ARTIFACTS_DIR
-chmod ug+x ${ARTIFACTS_DIR}/opt/jboss/container/maven/default/maven.sh
-
-# install artifacts
-pushd ${ARTIFACTS_DIR}
-cp -pr * /
-popd
-
-# pull in specific maven version to serve as default
-ln -s /opt/jboss/container/maven/35/* /opt/jboss/container/maven/default
-chown -h jboss:root /opt/jboss/container/maven/default/*
-
-# install default settings.xml file in user home
-mkdir -p $HOME/.m2
-ln -s /opt/jboss/container/maven/default/jboss-settings.xml $HOME/.m2/settings.xml
-
-chown -R jboss:root $HOME/.m2
-chmod -R ug+rwX $HOME/.m2
diff --git a/jboss/container/maven/default/bash/default/module.yaml b/jboss/container/maven/default/bash/default/module.yaml
deleted file mode 100644
index f44440a2..00000000
--- a/jboss/container/maven/default/bash/default/module.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
-schema_version: 1
-name: jboss.container.maven.default.bash
-version: '1!3.5'
-description: ^
- Provides basic Maven capabilities to an image, with support for configuring
- settings.xml using the environment variables described in
- jboss.container.maven.api.
-
-envs:
-- name: JBOSS_CONTAINER_MAVEN_DEFAULT_MODULE
- value: /opt/jboss/container/maven/default/
-
-execute:
-- script: configure.sh
-- script: backward_compatibility.sh
-
-modules:
- install:
- - name: jboss.container.maven.api
- - name: jboss.container.java.jvm.bash
- - name: jboss.container.maven.35.bash
- - name: jboss.container.util.logging.bash
diff --git a/jboss/container/maven/default/bash/default/tests/bats/add-repo.bats b/jboss/container/maven/default/bash/default/tests/bats/add-repo.bats
deleted file mode 100644
index 5df249e5..00000000
--- a/jboss/container/maven/default/bash/default/tests/bats/add-repo.bats
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/usr/bin/env bats
-load common
-
-@test "_add_maven_repo_profile: Should use the parameters provided and defaults for the rest" {
- run _add_maven_repo_profile $SETTINGS my_id http://my_url:8080
- assert_profile_xml "my_id-profile" "profile_default.xml"
- assert_active_profile "my_id-profile"
-}
-
-@test "_add_maven_repo_profile: Should use the parameters provided and defaults for the rest using prefix" {
- run _add_maven_repo_profile $SETTINGS my_id http://my_url:8080 "TEST_1"
- assert_profile_xml "my_id-profile" "profile_default.xml"
- assert_active_profile "my_id-profile"
-}
-
-@test "_add_maven_repo_profile: Should use all the parameters provided. No prefix" {
- REPO_LAYOUT="other_layout"
- REPO_RELEASES_ENABLED="false"
- REPO_RELEASES_UPDATE_POLICY="never"
- REPO_SNAPSHOTS_ENABLED="other_false"
- REPO_SNAPSHOTS_UPDATE_POLICY="other_never"
- REPO_SNAPSHOTS_CHECKSUM_POLICY="other_fail"
-
- run _add_maven_repo_profile $SETTINGS my_id http://my_url:8080
- assert_profile_xml "my_id-profile" "profile_all_vars.xml"
- assert_active_profile "my_id-profile"
-}
-
-@test "_add_maven_repo_profile: Should use all the parameters provided. Empty prefix" {
- REPO_LAYOUT="other_layout"
- REPO_RELEASES_ENABLED="false"
- REPO_RELEASES_UPDATE_POLICY="never"
- REPO_SNAPSHOTS_ENABLED="other_false"
- REPO_SNAPSHOTS_UPDATE_POLICY="other_never"
- REPO_SNAPSHOTS_CHECKSUM_POLICY="other_fail"
-
- run _add_maven_repo_profile $SETTINGS my_id http://my_url:8080
- assert_profile_xml "my_id-profile" "profile_all_vars.xml"
- assert_active_profile "my_id-profile"
-}
-
-@test "_add_maven_repo_profile: Should use all the parameters provided. Use prefix" {
- TEST_1_REPO_LAYOUT="other_layout"
- TEST_1_REPO_RELEASES_ENABLED="false"
- TEST_1_REPO_RELEASES_UPDATE_POLICY="never"
- TEST_1_REPO_SNAPSHOTS_ENABLED="other_false"
- TEST_1_REPO_SNAPSHOTS_UPDATE_POLICY="other_never"
- TEST_1_REPO_SNAPSHOTS_CHECKSUM_POLICY="other_fail"
-
- run _add_maven_repo_profile $SETTINGS my_id http://my_url:8080 "TEST_1"
- assert_profile_xml "my_id-profile" "profile_all_vars.xml"
- assert_active_profile "my_id-profile"
-}
diff --git a/jboss/container/maven/default/bash/default/tests/bats/add-server.bats b/jboss/container/maven/default/bash/default/tests/bats/add-server.bats
deleted file mode 100644
index 2149f34e..00000000
--- a/jboss/container/maven/default/bash/default/tests/bats/add-server.bats
+++ /dev/null
@@ -1,81 +0,0 @@
-#!/usr/bin/env bats
-load common
-
-@test "_add_maven_repo_server: Should set only the ID." {
- run _add_maven_repo_server $SETTINGS "my_id"
- assert_server_xml "my_id" "server.xml"
-}
-
-@test "_add_maven_repo_server: Should not set the username and password. Missing username" {
- REPO_PASSWORD="thefrog"
-
- run _add_maven_repo_server $SETTINGS "my_id"
- assert_server_xml "my_id" "server.xml"
-}
-
-@test "_add_maven_repo_server: Should not set the username and password. Missing password" {
- REPO_USERNAME="kermit"
-
- run _add_maven_repo_server $SETTINGS "my_id"
- assert_server_xml "my_id" "server.xml"
-}
-
-@test "_add_maven_repo_server: Should set the username and password." {
- REPO_USERNAME="kermit"
- REPO_PASSWORD="thefrog"
-
- run _add_maven_repo_server $SETTINGS "my_id"
- assert_server_xml "my_id" "server_with_username.xml"
-}
-
-@test "_add_maven_repo_server: Should not set the private key and passphrase. Missing private key" {
- REPO_PASSPHRASE="mypassphrase"
-
- run _add_maven_repo_server $SETTINGS "my_id"
- assert_server_xml "my_id" "server.xml"
-}
-
-@test "_add_maven_repo_server: Should not set the private key and passphrase. Missing passphrase" {
- REPO_PRIVATE_KEY="myprivatekey"
-
- run _add_maven_repo_server $SETTINGS "my_id"
- assert_server_xml "my_id" "server.xml"
-}
-
-@test "_add_maven_repo_server: Should set the private key and passphrase" {
- REPO_PRIVATE_KEY="myprivatekey"
- REPO_PASSPHRASE="mypassphrase"
-
- run _add_maven_repo_server $SETTINGS "my_id"
- assert_server_xml "my_id" "server_with_privatekey.xml"
-}
-
-@test "_add_maven_repo_server: Should use all the parameters provided. No prefix" {
- REPO_USERNAME="kermit"
- REPO_PASSWORD="thefrog"
- REPO_PRIVATE_KEY="myprivatekey"
- REPO_PASSPHRASE="mypassphrase"
-
- run _add_maven_repo_server $SETTINGS "my_id"
- assert_server_xml "my_id" "server_with_all.xml"
-}
-
-@test "_add_maven_repo_server: Should use all the parameters provided. Empty prefix" {
- REPO_USERNAME="kermit"
- REPO_PASSWORD="thefrog"
- REPO_PRIVATE_KEY="myprivatekey"
- REPO_PASSPHRASE="mypassphrase"
-
- run _add_maven_repo_server $SETTINGS "my_id" ""
- assert_server_xml "my_id" "server_with_all.xml"
-}
-
-@test "_add_maven_repo_server: Should use all the parameters provided. Use prefix" {
- TEST_REPO_USERNAME="kermit"
- TEST_REPO_PASSWORD="thefrog"
- TEST_REPO_PRIVATE_KEY="myprivatekey"
- TEST_REPO_PASSPHRASE="mypassphrase"
-
- run _add_maven_repo_server $SETTINGS "my_id" "TEST"
- assert_server_xml "my_id" "server_with_all.xml"
-}
diff --git a/jboss/container/maven/default/bash/default/tests/bats/common.bash b/jboss/container/maven/default/bash/default/tests/bats/common.bash
deleted file mode 100644
index 03f8e9c3..00000000
--- a/jboss/container/maven/default/bash/default/tests/bats/common.bash
+++ /dev/null
@@ -1,62 +0,0 @@
-CCT_MODULE_DIR="${BATS_TEST_DIRNAME}/../../../../../../.."
-
-load $CCT_MODULE_DIR/tests/bats/common/xml_utils.bash
-
-export JBOSS_HOME=$BATS_TMPDIR/jboss_home
-mkdir -p $JBOSS_HOME/bin/launch
-cp $CCT_MODULE_DIR/os-eap7-launch/added/launch/launch-common.sh $JBOSS_HOME/bin/launch
-cp $CCT_MODULE_DIR/jboss/container/util/logging/bash/artifacts/opt/jboss/container/util/logging/logging.sh $JBOSS_HOME/bin/launch
-
-export HOME=$BATS_TMPDIR/home
-export SETTINGS=$HOME/.m2/settings.xml
-export JBOSS_CONTAINER_UTIL_LOGGING_MODULE=$CCT_MODULE_DIR/jboss/container/util/logging/bash/artifacts/opt/jboss/container/util/logging
-
-mkdir -p $HOME/.m2
-
-source $CCT_MODULE_DIR/jboss/container/maven/default/bash/artifacts/opt/jboss/container/maven/default/maven.sh
-
-setup() {
- cp $CCT_MODULE_DIR/jboss/container/maven/default/bash/artifacts/opt/jboss/container/maven/default/jboss-settings.xml $HOME/.m2/settings.xml
-}
-
-function assert_profile_xml() {
- local profile_id=$1
- local expected=$2
- local xpath='//*[local-name()="profile"][*[local-name()="id"]="'$profile_id'"]'
-
- assert_xml $HOME/.m2/settings.xml $xpath $BATS_TEST_DIRNAME/expectations/$expected
-}
-
-function has_generated_profile() {
- local xpath='//*[local-name()="profile"][starts-with(*[local-name()="id"],"repo-")]/*[local-name()="id"]/text()'
-
- assert_xml_value $HOME/.m2/settings.xml $xpath '^repo-.*-profile$'
-}
-
-function assert_active_profile() {
- local profile_id=$1
- local xpath='//*[local-name()="activeProfile"][text()="'$profile_id'"]/text()'
-
- assert_xml_value $HOME/.m2/settings.xml $xpath $profile_id
-}
-
-function has_generated_active_profile() {
- local xpath='//*[local-name()="activeProfile"][starts-with(.,"repo-")]/text()'
-
- assert_xml_value $HOME/.m2/settings.xml $xpath '^repo-.*-profile$'
-}
-
-function assert_server_xml() {
- local profile_id=$1
- local expected=$2
- local xpath='//*[local-name()="server"][*[local-name()="id"]="'$profile_id'"]'
-
- assert_xml $HOME/.m2/settings.xml $xpath $BATS_TEST_DIRNAME/expectations/$expected
-}
-
-function has_generated_server() {
- local profile_regex=$1
- local xpath='//*[local-name()="server"][starts-with(*[local-name()="id"],"repo-")]/*[local-name()="id"]/text()'
-
- assert_xml_value $HOME/.m2/settings.xml $xpath '^repo-.*$'
-}
diff --git a/jboss/container/maven/default/bash/default/tests/bats/configure.bats b/jboss/container/maven/default/bash/default/tests/bats/configure.bats
deleted file mode 100644
index fb49bff8..00000000
--- a/jboss/container/maven/default/bash/default/tests/bats/configure.bats
+++ /dev/null
@@ -1,131 +0,0 @@
-#!/usr/bin/env bats
-load common
-
-@test "add_maven_repo: Should use the default parameters." {
- run add_maven_repo $SETTINGS "http://my_url:8080" "my_id"
-
- assert_profile_xml "my_id-profile" "profile_default.xml"
- assert_active_profile "my_id-profile"
- assert_server_xml "my_id" "server.xml"
-}
-
-@test "add_maven_repo: Should discover the repo_url and use the MAVEN_REPO_HOST env var. No prefix, defaults to MAVEN" {
- MAVEN_REPO_SERVICE="my_service"
- MAVEN_REPO_HOST="my_url"
-
- run add_maven_repo $SETTINGS "" "my_id"
-
- assert_profile_xml "my_id-profile" "profile_default_discovery.xml"
- assert_active_profile "my_id-profile"
- assert_server_xml "my_id" "server.xml"
-}
-
-@test "add_maven_repo: Should discover the repo_url and use the X_SERVICE_HOST. No prefix, defaults to MAVEN" {
- MAVEN_REPO_SERVICE="my_service"
- MY_SERVICE_SERVICE_HOST="my_url"
-
- run add_maven_repo $SETTINGS "" "my_id"
-
- assert_profile_xml "my_id-profile" "profile_default_discovery.xml"
- assert_active_profile "my_id-profile"
- assert_server_xml "my_id" "server.xml"
-}
-
-@test "add_maven_repo: Should discover the repo_url. Set all parameters. No prefix, defaults to MAVEN" {
- MAVEN_REPO_SERVICE="my_service"
- MAVEN_REPO_HOST="my_url"
- MAVEN_REPO_PROTOCOL="https"
- MAVEN_REPO_PORT="9090"
- MAVEN_REPO_PATH="/custom_path"
-
- run add_maven_repo $SETTINGS "" "my_id"
-
- assert_profile_xml "my_id-profile" "profile_custom_discovery.xml"
- assert_active_profile "my_id-profile"
- assert_server_xml "my_id" "server.xml"
-}
-
-@test "add_maven_repo: Should discover the repo_url. Discover SERVICE_PORT. No prefix, defaults to MAVEN" {
- MAVEN_REPO_SERVICE="my_service"
- MAVEN_REPO_HOST="my_url"
- MAVEN_REPO_PROTOCOL="https"
- MY_SERVICE_SERVICE_PORT="9090"
- MAVEN_REPO_PATH="/custom_path"
-
- run add_maven_repo $SETTINGS "" "my_id"
-
- assert_profile_xml "my_id-profile" "profile_custom_discovery.xml"
- assert_active_profile "my_id-profile"
- assert_server_xml "my_id" "server.xml"
-}
-
-@test "add_maven_repo: Should discover the repo_url. Set all parameters. Use prefix" {
- TEST_1_MAVEN_REPO_SERVICE="my_service"
- TEST_1_MAVEN_REPO_HOST="my_url"
- TEST_1_MAVEN_REPO_PROTOCOL="https"
- TEST_1_MAVEN_REPO_PORT="9090"
- TEST_1_MAVEN_REPO_PATH="/custom_path"
-
- run add_maven_repo $SETTINGS "" "my_id" "test-1"
-
- assert_profile_xml "my_id-profile" "profile_custom_discovery.xml"
- assert_active_profile "my_id-profile"
- assert_server_xml "my_id" "server.xml"
-}
-
-@test "add_maven_repos: Should configure a single repo with MAVEN_REPO_ID." {
- MAVEN_REPO_URL="http://my_url:8080"
- MAVEN_REPO_ID="my_id"
-
- run add_maven_repos $SETTINGS
-
- assert_profile_xml "my_id-profile" "profile_default.xml"
- assert_active_profile "my_id-profile"
- assert_server_xml "my_id" "server.xml"
-}
-
-@test "add_maven_repos: Should configure a single repo with generated REPO_ID." {
- MAVEN_REPO_URL="http://my_url:8080"
-
- run add_maven_repos $SETTINGS
-
- has_generated_profile
- has_generated_active_profile
- has_generated_server
-}
-
-@test "add_maven_repos: Should configure Multiple repos and not the Single repo." {
- MAVEN_REPOS=repo1
- REPO1_MAVEN_REPO_ID=id_repo1
- REPO1_MAVEN_REPO_URL=http://repo1:8383/
-
- run add_maven_repos $SETTINGS
-
- assert_profile_xml "id_repo1-profile" "profile_repo1.xml"
- assert_active_profile "id_repo1-profile"
- assert_server_xml "id_repo1" "server_repo1.xml"
-}
-
-@test "add_maven_repos: Should configure Generated Single and Multiple repos." {
- MAVEN_REPO_URL="http://my_url:8080"
- MAVEN_REPOS=repo1,repo-2
- REPO1_MAVEN_REPO_ID=id_repo1
- REPO1_MAVEN_REPO_URL=http://repo1:8383/
- REPO_2_MAVEN_REPO_ID=id-repo-2
- REPO_2_MAVEN_REPO_URL=http://repo-2:5050/
-
- run add_maven_repos $SETTINGS
-
- # Generated Single repo
- has_generated_profile
- has_generated_active_profile
- has_generated_server
- # Multiple repo repo1
- assert_profile_xml "id_repo1-profile" "profile_repo1.xml"
- assert_active_profile "id_repo1-profile"
- assert_server_xml "id_repo1" "server_repo1.xml"
- # Multiple repo repo-2
- assert_profile_xml "id-repo-2-profile" "profile_repo2.xml"
- assert_active_profile "id-repo-2-profile"
- assert_server_xml "id-repo-2" "server_repo2.xml"
-}
diff --git a/jboss/container/maven/default/bash/default/tests/bats/expectations/profile_all_vars.xml b/jboss/container/maven/default/bash/default/tests/bats/expectations/profile_all_vars.xml
deleted file mode 100644
index 13abe6cf..00000000
--- a/jboss/container/maven/default/bash/default/tests/bats/expectations/profile_all_vars.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
- my_id-profile
-
-
- my_id
- my_id
- http://my_url:8080
- other_layout
-
- false
- never
- warn
-
-
- other_false
- other_never
- other_fail
-
-
-
-
diff --git a/jboss/container/maven/default/bash/default/tests/bats/expectations/profile_custom_discovery.xml b/jboss/container/maven/default/bash/default/tests/bats/expectations/profile_custom_discovery.xml
deleted file mode 100644
index 43a0bbed..00000000
--- a/jboss/container/maven/default/bash/default/tests/bats/expectations/profile_custom_discovery.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
- my_id-profile
-
-
- my_id
- my_id
- https://my_url:9090/custom_path
- default
-
- true
- always
- warn
-
-
- true
- always
- warn
-
-
-
-
diff --git a/jboss/container/maven/default/bash/default/tests/bats/expectations/profile_default.xml b/jboss/container/maven/default/bash/default/tests/bats/expectations/profile_default.xml
deleted file mode 100644
index 042d341e..00000000
--- a/jboss/container/maven/default/bash/default/tests/bats/expectations/profile_default.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
- my_id-profile
-
-
- my_id
- my_id
- http://my_url:8080
- default
-
- true
- always
- warn
-
-
- true
- always
- warn
-
-
-
-
diff --git a/jboss/container/maven/default/bash/default/tests/bats/expectations/profile_default_discovery.xml b/jboss/container/maven/default/bash/default/tests/bats/expectations/profile_default_discovery.xml
deleted file mode 100644
index 2430794e..00000000
--- a/jboss/container/maven/default/bash/default/tests/bats/expectations/profile_default_discovery.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
- my_id-profile
-
-
- my_id
- my_id
- http://my_url:8080/
- default
-
- true
- always
- warn
-
-
- true
- always
- warn
-
-
-
-
diff --git a/jboss/container/maven/default/bash/default/tests/bats/expectations/profile_repo1.xml b/jboss/container/maven/default/bash/default/tests/bats/expectations/profile_repo1.xml
deleted file mode 100644
index 7d62cb76..00000000
--- a/jboss/container/maven/default/bash/default/tests/bats/expectations/profile_repo1.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
- id_repo1-profile
-
-
- id_repo1
- id_repo1
- http://repo1:8383/
- default
-
- true
- always
- warn
-
-
- true
- always
- warn
-
-
-
-
diff --git a/jboss/container/maven/default/bash/default/tests/bats/expectations/profile_repo2.xml b/jboss/container/maven/default/bash/default/tests/bats/expectations/profile_repo2.xml
deleted file mode 100644
index d52ec536..00000000
--- a/jboss/container/maven/default/bash/default/tests/bats/expectations/profile_repo2.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
- id-repo-2-profile
-
-
- id-repo-2
- id-repo-2
- http://repo-2:5050/
- default
-
- true
- always
- warn
-
-
- true
- always
- warn
-
-
-
-
diff --git a/jboss/container/maven/default/bash/default/tests/bats/expectations/server.xml b/jboss/container/maven/default/bash/default/tests/bats/expectations/server.xml
deleted file mode 100644
index ccbe3c8b..00000000
--- a/jboss/container/maven/default/bash/default/tests/bats/expectations/server.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
- my_id
-
diff --git a/jboss/container/maven/default/bash/default/tests/bats/expectations/server_repo1.xml b/jboss/container/maven/default/bash/default/tests/bats/expectations/server_repo1.xml
deleted file mode 100644
index 5d756470..00000000
--- a/jboss/container/maven/default/bash/default/tests/bats/expectations/server_repo1.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
- id_repo1
-
diff --git a/jboss/container/maven/default/bash/default/tests/bats/expectations/server_repo2.xml b/jboss/container/maven/default/bash/default/tests/bats/expectations/server_repo2.xml
deleted file mode 100644
index 6cf7352b..00000000
--- a/jboss/container/maven/default/bash/default/tests/bats/expectations/server_repo2.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
- id-repo-2
-
diff --git a/jboss/container/maven/default/bash/default/tests/bats/expectations/server_with_all.xml b/jboss/container/maven/default/bash/default/tests/bats/expectations/server_with_all.xml
deleted file mode 100644
index a99ebb5b..00000000
--- a/jboss/container/maven/default/bash/default/tests/bats/expectations/server_with_all.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
- my_id
- kermit
-
- myprivatekey
-
-
diff --git a/jboss/container/maven/default/bash/default/tests/bats/expectations/server_with_privatekey.xml b/jboss/container/maven/default/bash/default/tests/bats/expectations/server_with_privatekey.xml
deleted file mode 100644
index dd6ff74e..00000000
--- a/jboss/container/maven/default/bash/default/tests/bats/expectations/server_with_privatekey.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
- my_id
- myprivatekey
-
-
diff --git a/jboss/container/maven/default/bash/default/tests/bats/expectations/server_with_username.xml b/jboss/container/maven/default/bash/default/tests/bats/expectations/server_with_username.xml
deleted file mode 100644
index 86c1e929..00000000
--- a/jboss/container/maven/default/bash/default/tests/bats/expectations/server_with_username.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
- my_id
- kermit
-
-
diff --git a/jboss/container/maven/default/bash/36/configure.sh b/jboss/container/maven/default/configure.sh
similarity index 82%
rename from jboss/container/maven/default/bash/36/configure.sh
rename to jboss/container/maven/default/configure.sh
index fa6c51cb..afc29f8f 100755
--- a/jboss/container/maven/default/bash/36/configure.sh
+++ b/jboss/container/maven/default/configure.sh
@@ -15,8 +15,10 @@ pushd ${ARTIFACTS_DIR}
cp -pr * /
popd
+MAVEN_VERSION_SQUASHED=${MAVEN_VERSION/./}
+
# pull in specific maven version to serve as default
-ln -s /opt/jboss/container/maven/36/* /opt/jboss/container/maven/default
+ln -s /opt/jboss/container/maven/${MAVEN_VERSION_SQUASHED}/* /opt/jboss/container/maven/default
chown -h jboss:root /opt/jboss/container/maven/default/*
# install default settings.xml file in user home
diff --git a/jboss/container/maven/default/bash/36/module.yaml b/jboss/container/maven/default/module.yaml
similarity index 83%
rename from jboss/container/maven/default/bash/36/module.yaml
rename to jboss/container/maven/default/module.yaml
index b88f0d6c..48eb7500 100644
--- a/jboss/container/maven/default/bash/36/module.yaml
+++ b/jboss/container/maven/default/module.yaml
@@ -1,6 +1,6 @@
schema_version: 1
-name: jboss.container.maven.default.bash
-version: '0!3.6'
+name: jboss.container.maven.default
+version: '1.0'
description: ^
Provides basic Maven capabilities to an image, with support for configuring
settings.xml using the environment variables described in
@@ -18,5 +18,5 @@ modules:
install:
- name: jboss.container.maven.api
- name: jboss.container.java.jvm.bash
- - name: jboss.container.maven.36.bash
+ - name: jboss.container.maven
- name: jboss.container.util.logging.bash
diff --git a/jboss/container/maven/default/bash/36/tests/bats/add-repo.bats b/jboss/container/maven/default/tests/bats/add-repo.bats
similarity index 100%
rename from jboss/container/maven/default/bash/36/tests/bats/add-repo.bats
rename to jboss/container/maven/default/tests/bats/add-repo.bats
diff --git a/jboss/container/maven/default/bash/36/tests/bats/add-server.bats b/jboss/container/maven/default/tests/bats/add-server.bats
similarity index 100%
rename from jboss/container/maven/default/bash/36/tests/bats/add-server.bats
rename to jboss/container/maven/default/tests/bats/add-server.bats
diff --git a/jboss/container/maven/default/bash/36/tests/bats/common.bash b/jboss/container/maven/default/tests/bats/common.bash
similarity index 88%
rename from jboss/container/maven/default/bash/36/tests/bats/common.bash
rename to jboss/container/maven/default/tests/bats/common.bash
index 03f8e9c3..16be76e1 100644
--- a/jboss/container/maven/default/bash/36/tests/bats/common.bash
+++ b/jboss/container/maven/default/tests/bats/common.bash
@@ -13,10 +13,10 @@ export JBOSS_CONTAINER_UTIL_LOGGING_MODULE=$CCT_MODULE_DIR/jboss/container/util/
mkdir -p $HOME/.m2
-source $CCT_MODULE_DIR/jboss/container/maven/default/bash/artifacts/opt/jboss/container/maven/default/maven.sh
+source $CCT_MODULE_DIR/jboss/container/maven/default/artifacts/opt/jboss/container/maven/default/maven.sh
setup() {
- cp $CCT_MODULE_DIR/jboss/container/maven/default/bash/artifacts/opt/jboss/container/maven/default/jboss-settings.xml $HOME/.m2/settings.xml
+ cp $CCT_MODULE_DIR/jboss/container/maven/default/artifacts/opt/jboss/container/maven/default/jboss-settings.xml $HOME/.m2/settings.xml
}
function assert_profile_xml() {
diff --git a/jboss/container/maven/default/bash/36/tests/bats/configure.bats b/jboss/container/maven/default/tests/bats/configure.bats
similarity index 100%
rename from jboss/container/maven/default/bash/36/tests/bats/configure.bats
rename to jboss/container/maven/default/tests/bats/configure.bats
diff --git a/jboss/container/maven/default/bash/36/tests/bats/expectations/profile_all_vars.xml b/jboss/container/maven/default/tests/bats/expectations/profile_all_vars.xml
similarity index 100%
rename from jboss/container/maven/default/bash/36/tests/bats/expectations/profile_all_vars.xml
rename to jboss/container/maven/default/tests/bats/expectations/profile_all_vars.xml
diff --git a/jboss/container/maven/default/bash/36/tests/bats/expectations/profile_custom_discovery.xml b/jboss/container/maven/default/tests/bats/expectations/profile_custom_discovery.xml
similarity index 100%
rename from jboss/container/maven/default/bash/36/tests/bats/expectations/profile_custom_discovery.xml
rename to jboss/container/maven/default/tests/bats/expectations/profile_custom_discovery.xml
diff --git a/jboss/container/maven/default/bash/36/tests/bats/expectations/profile_default.xml b/jboss/container/maven/default/tests/bats/expectations/profile_default.xml
similarity index 100%
rename from jboss/container/maven/default/bash/36/tests/bats/expectations/profile_default.xml
rename to jboss/container/maven/default/tests/bats/expectations/profile_default.xml
diff --git a/jboss/container/maven/default/bash/36/tests/bats/expectations/profile_default_discovery.xml b/jboss/container/maven/default/tests/bats/expectations/profile_default_discovery.xml
similarity index 100%
rename from jboss/container/maven/default/bash/36/tests/bats/expectations/profile_default_discovery.xml
rename to jboss/container/maven/default/tests/bats/expectations/profile_default_discovery.xml
diff --git a/jboss/container/maven/default/bash/36/tests/bats/expectations/profile_repo1.xml b/jboss/container/maven/default/tests/bats/expectations/profile_repo1.xml
similarity index 100%
rename from jboss/container/maven/default/bash/36/tests/bats/expectations/profile_repo1.xml
rename to jboss/container/maven/default/tests/bats/expectations/profile_repo1.xml
diff --git a/jboss/container/maven/default/bash/36/tests/bats/expectations/profile_repo2.xml b/jboss/container/maven/default/tests/bats/expectations/profile_repo2.xml
similarity index 100%
rename from jboss/container/maven/default/bash/36/tests/bats/expectations/profile_repo2.xml
rename to jboss/container/maven/default/tests/bats/expectations/profile_repo2.xml
diff --git a/jboss/container/maven/default/bash/36/tests/bats/expectations/server.xml b/jboss/container/maven/default/tests/bats/expectations/server.xml
similarity index 100%
rename from jboss/container/maven/default/bash/36/tests/bats/expectations/server.xml
rename to jboss/container/maven/default/tests/bats/expectations/server.xml
diff --git a/jboss/container/maven/default/bash/36/tests/bats/expectations/server_repo1.xml b/jboss/container/maven/default/tests/bats/expectations/server_repo1.xml
similarity index 100%
rename from jboss/container/maven/default/bash/36/tests/bats/expectations/server_repo1.xml
rename to jboss/container/maven/default/tests/bats/expectations/server_repo1.xml
diff --git a/jboss/container/maven/default/bash/36/tests/bats/expectations/server_repo2.xml b/jboss/container/maven/default/tests/bats/expectations/server_repo2.xml
similarity index 100%
rename from jboss/container/maven/default/bash/36/tests/bats/expectations/server_repo2.xml
rename to jboss/container/maven/default/tests/bats/expectations/server_repo2.xml
diff --git a/jboss/container/maven/default/bash/36/tests/bats/expectations/server_with_all.xml b/jboss/container/maven/default/tests/bats/expectations/server_with_all.xml
similarity index 100%
rename from jboss/container/maven/default/bash/36/tests/bats/expectations/server_with_all.xml
rename to jboss/container/maven/default/tests/bats/expectations/server_with_all.xml
diff --git a/jboss/container/maven/default/bash/36/tests/bats/expectations/server_with_privatekey.xml b/jboss/container/maven/default/tests/bats/expectations/server_with_privatekey.xml
similarity index 100%
rename from jboss/container/maven/default/bash/36/tests/bats/expectations/server_with_privatekey.xml
rename to jboss/container/maven/default/tests/bats/expectations/server_with_privatekey.xml
diff --git a/jboss/container/maven/default/bash/36/tests/bats/expectations/server_with_username.xml b/jboss/container/maven/default/tests/bats/expectations/server_with_username.xml
similarity index 100%
rename from jboss/container/maven/default/bash/36/tests/bats/expectations/server_with_username.xml
rename to jboss/container/maven/default/tests/bats/expectations/server_with_username.xml
diff --git a/jboss/container/maven/s2i/bash/artifacts/opt/jboss/container/maven/s2i/maven-overrides b/jboss/container/maven/s2i/artifacts/opt/jboss/container/maven/s2i/maven-overrides
similarity index 100%
rename from jboss/container/maven/s2i/bash/artifacts/opt/jboss/container/maven/s2i/maven-overrides
rename to jboss/container/maven/s2i/artifacts/opt/jboss/container/maven/s2i/maven-overrides
diff --git a/jboss/container/maven/s2i/bash/artifacts/opt/jboss/container/maven/s2i/maven-s2i b/jboss/container/maven/s2i/artifacts/opt/jboss/container/maven/s2i/maven-s2i
similarity index 100%
rename from jboss/container/maven/s2i/bash/artifacts/opt/jboss/container/maven/s2i/maven-s2i
rename to jboss/container/maven/s2i/artifacts/opt/jboss/container/maven/s2i/maven-s2i
diff --git a/jboss/container/maven/s2i/bash/artifacts/usr/local/s2i/assemble b/jboss/container/maven/s2i/artifacts/usr/local/s2i/assemble
similarity index 100%
rename from jboss/container/maven/s2i/bash/artifacts/usr/local/s2i/assemble
rename to jboss/container/maven/s2i/artifacts/usr/local/s2i/assemble
diff --git a/jboss/container/maven/s2i/bash/artifacts/usr/local/s2i/save-artifacts b/jboss/container/maven/s2i/artifacts/usr/local/s2i/save-artifacts
similarity index 100%
rename from jboss/container/maven/s2i/bash/artifacts/usr/local/s2i/save-artifacts
rename to jboss/container/maven/s2i/artifacts/usr/local/s2i/save-artifacts
diff --git a/jboss/container/maven/s2i/bash/module.yaml b/jboss/container/maven/s2i/bash/module.yaml
deleted file mode 100644
index 7c708eb6..00000000
--- a/jboss/container/maven/s2i/bash/module.yaml
+++ /dev/null
@@ -1,18 +0,0 @@
-schema_version: 1
-name: jboss.container.maven.s2i.bash
-version: '1.0'
-description: Provides s2i capabilities built around Maven.
-
-envs:
-- name: JBOSS_CONTAINER_MAVEN_S2I_MODULE
- value: /opt/jboss/container/maven/s2i
-
-execute:
-- script: configure.sh
-
-modules:
- install:
- - name: jboss.container.maven.s2i.api
- - name: jboss.container.s2i.core.bash
- - name: jboss.container.maven.default.bash
- - name: jboss.container.util.logging.bash
diff --git a/jboss/container/maven/s2i/bash/configure.sh b/jboss/container/maven/s2i/configure.sh
similarity index 100%
rename from jboss/container/maven/s2i/bash/configure.sh
rename to jboss/container/maven/s2i/configure.sh
diff --git a/jboss/container/maven/s2i/api/module.yaml b/jboss/container/maven/s2i/module.yaml
similarity index 62%
rename from jboss/container/maven/s2i/api/module.yaml
rename to jboss/container/maven/s2i/module.yaml
index dc7c741c..d1a0059e 100644
--- a/jboss/container/maven/s2i/api/module.yaml
+++ b/jboss/container/maven/s2i/module.yaml
@@ -1,9 +1,9 @@
schema_version: 1
-name: jboss.container.maven.s2i.api
+name: jboss.container.maven.s2i
version: '1.0'
description: ^
- Defines environment variables and labels used by Maven s2i. Modules
- implementing Maven S2I should use these variables accordingly.
+ Provides s2i capabilities built around Maven.
+ Defines environment variables and labels used by Maven s2i.
envs:
- name: MAVEN_S2I_ARTIFACT_DIRS
@@ -18,10 +18,19 @@ envs:
mvn $MAVEN_S2I_GOALS. Defaults to **package**
example: package install
+- name: JBOSS_CONTAINER_MAVEN_S2I_MODULE
+ value: /opt/jboss/container/maven/s2i
+
# Deprecated environment variables
- name: ARTIFACT_DIR
description: Deprecated by **MAVEN_S2I_ARTIFACT_DIRS**.
+execute:
+- script: configure.sh
+
modules:
install:
- name: jboss.container.s2i.core.api
+ - name: jboss.container.s2i.core.bash
+ - name: jboss.container.maven.default
+ - name: jboss.container.util.logging.bash
diff --git a/s2i-common/module.yaml b/s2i-common/module.yaml
index dfded480..ff27478c 100644
--- a/s2i-common/module.yaml
+++ b/s2i-common/module.yaml
@@ -5,4 +5,4 @@ description: Legacy s2i-common script package.
modules:
install:
- - name: jboss.container.maven.default.bash
+ - name: jboss.container.maven.default