diff options
author | Josh Spicer <joshspicer@github.com> | 2022-05-26 05:25:40 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-26 05:25:40 +0300 |
commit | cc03be1bafd26a0a49ac3132dd633ef7fa00bee9 (patch) | |
tree | df6e7b1a2d67903a7c82df0adae1058e60c8bafc | |
parent | 1678006363e84a3641e9cf1ff1e9bf918c20db83 (diff) |
maven and optional sdkman (#25)
* maven
* optional sdk man
-rw-r--r-- | .github/workflows/test-all.yaml | 2 | ||||
-rw-r--r-- | .github/workflows/test-pr.yaml | 2 | ||||
-rw-r--r-- | src/gradle/feature.json | 14 | ||||
-rw-r--r-- | src/maven/feature.json | 14 | ||||
-rw-r--r-- | src/maven/install.sh | 9 | ||||
-rw-r--r-- | test/maven/test.sh | 2 |
6 files changed, 30 insertions, 13 deletions
diff --git a/.github/workflows/test-all.yaml b/.github/workflows/test-all.yaml index ee4d50b..45114bf 100644 --- a/.github/workflows/test-all.yaml +++ b/.github/workflows/test-all.yaml @@ -30,7 +30,7 @@ jobs: "ruby jekyll", # Install 'ruby', then 'jekyll' "python jupyterlab", # Install 'python', then 'jupyterlab' "kubectl-helm-minikube", - "maven", + "java maven", # Install 'java', then 'maven' "node", "php", "powershell", diff --git a/.github/workflows/test-pr.yaml b/.github/workflows/test-pr.yaml index fcfe91f..f84c9b5 100644 --- a/.github/workflows/test-pr.yaml +++ b/.github/workflows/test-pr.yaml @@ -30,7 +30,7 @@ jobs: jekyll: ./**/jekyll/** 'python jupyterlab': ./**/jupyterlab/** kubectl-helm-minikube: ./**/kubectl-helm-minikube/** - maven: ./**/maven/** + 'java maven': ./**/maven/** node: ./**/node/** php: ./**/php/** powershell: ./**/powershell/** diff --git a/src/gradle/feature.json b/src/gradle/feature.json index 6962eaa..879a8b5 100644 --- a/src/gradle/feature.json +++ b/src/gradle/feature.json @@ -5,14 +5,22 @@ "options": { "version": { "type": "string", - "proposals": ["latest", "none", "7", "6", "5"], + "proposals": [ + "latest", + "none", + "7", + "6", + "5" + ], "default": "latest", "description": "Select or enter a Gradle version to install" } }, - "extensions": ["vscjava.vscode-java-pack"], + "extensions": [ + "vscjava.vscode-java-pack" + ], "containerEnv": { - "SDKMAN_DIR": "/usr/local/sdkman", + "SDKMAN_DIR": "${SDKMAN_DIR:-\"/usr/local/sdkman\"}", "PATH": "${SDKMAN_DIR}/bin:${SDKMAN_DIR}/candidates/gradle/current/bin:${PATH}" }, "install": { diff --git a/src/maven/feature.json b/src/maven/feature.json index 7b94581..04c1774 100644 --- a/src/maven/feature.json +++ b/src/maven/feature.json @@ -5,14 +5,22 @@ "options": { "version": { "type": "string", - "proposals": ["latest", "none", "3.8", "3.6", "3.5"], + "proposals": [ + "latest", + "none", + "3.8", + "3.6", + "3.5" + ], "default": "latest", "description": "Select or enter a Maven version to install" } }, - "extensions": ["vscjava.vscode-java-pack"], + "extensions": [ + "vscjava.vscode-java-pack" + ], "containerEnv": { - "SDKMAN_DIR": "/usr/local/sdkman", + "SDKMAN_DIR": "${SDKMAN_DIR:-\"/usr/local/sdkman\"}", "PATH": "${SDKMAN_DIR}/bin:${SDKMAN_DIR}/candidates/maven/current/bin:${PATH}" }, "install": { diff --git a/src/maven/install.sh b/src/maven/install.sh index f8369f5..8472d71 100644 --- a/src/maven/install.sh +++ b/src/maven/install.sh @@ -7,12 +7,13 @@ # Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/maven.md # Maintainer: The VS Code and Codespaces Teams # -# Syntax: ./maven-debian.sh [maven version] [SDKMAN_DIR] [non-root user] [Update rc files flag] +# Syntax: ./maven-debian.sh [maven version] [non-root user] [Update rc files flag] MAVEN_VERSION=${1:-"latest"} -export SDKMAN_DIR=${2:-"/usr/local/sdkman"} -USERNAME=${3:-"automatic"} -UPDATE_RC=${4:-"true"} +USERNAME=${2:-"automatic"} +UPDATE_RC=${3:-"true"} + +SDKMAN_DIR=${SDKMAN_DIR:-"/usr/local/sdkman"} set -e diff --git a/test/maven/test.sh b/test/maven/test.sh index 561eed0..0cb99ea 100644 --- a/test/maven/test.sh +++ b/test/maven/test.sh @@ -6,7 +6,7 @@ set -e source dev-container-features-test-lib # Definition specific tests -check "version" maven --version +check "version" mvn --version # Report result reportResults
\ No newline at end of file |