Skip to content
Snippets Groups Projects
Commit cc03aac2 authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

refactor: use plugins shorthand

parent 93cd62b8
No related branches found
No related tags found
No related merge requests found
...@@ -187,7 +187,7 @@ stages: ...@@ -187,7 +187,7 @@ stages:
git config --global user.email "${GITLAB_USER_EMAIL}" git config --global user.email "${GITLAB_USER_EMAIL}"
git config --global user.name "${GITLAB_USER_NAME}" git config --global user.name "${GITLAB_USER_NAME}"
# shellcheck disable=SC2086 # shellcheck disable=SC2086
scm_url=$(mvn $MAVEN_CLI_OPTS $mvn_settings_opt $java_proxy_args org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -Dexpression=project.scm.developerConnection -q -DforceStdout | tail -n 1) scm_url=$(mvn $MAVEN_CLI_OPTS $mvn_settings_opt $java_proxy_args help:evaluate -Dexpression=project.scm.developerConnection -q -DforceStdout | tail -n 1)
if [[ $scm_url == "scm:git:https"* ]]; then if [[ $scm_url == "scm:git:https"* ]]; then
if [[ -n "${GIT_USERNAME}" ]] && [[ -n "${GIT_PASSWORD}" ]]; then if [[ -n "${GIT_USERNAME}" ]] && [[ -n "${GIT_PASSWORD}" ]]; then
log_info "--- using SCM credentials from env (\$GIT_USERNAME and \$GIT_PASSWORD)..." log_info "--- using SCM credentials from env (\$GIT_USERNAME and \$GIT_PASSWORD)..."
...@@ -382,7 +382,7 @@ stages: ...@@ -382,7 +382,7 @@ stages:
function mvn_deploy() { function mvn_deploy() {
# shellcheck disable=SC2086 # shellcheck disable=SC2086
pom_version=$(mvn $MAVEN_CLI_OPTS $mvn_settings_opt $java_proxy_args org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -Dexpression=project.version -q -DforceStdout | tail -n 1) pom_version=$(mvn $MAVEN_CLI_OPTS $mvn_settings_opt $java_proxy_args help:evaluate -Dexpression=project.version -q -DforceStdout | tail -n 1)
if [[ "$CI_COMMIT_TAG" ]] && [[ "$pom_version" =~ -SNAPSHOT$ ]] if [[ "$CI_COMMIT_TAG" ]] && [[ "$pom_version" =~ -SNAPSHOT$ ]]
then then
log_warn "Can't publish SNAPSHOT version \\e[33;1m${pom_version}\\e[0m from tag: skip" log_warn "Can't publish SNAPSHOT version \\e[33;1m${pom_version}\\e[0m from tag: skip"
...@@ -506,7 +506,7 @@ mvn-no-snapshot-deps: ...@@ -506,7 +506,7 @@ mvn-no-snapshot-deps:
stage: test stage: test
needs: [] needs: []
script: script:
- mvn ${TRACE+-X} $MAVEN_CLI_OPTS $mvn_settings_opt $java_proxy_args org.apache.maven.plugins:maven-enforcer-plugin:3.0.0:enforce -Drules=requireReleaseDeps - mvn ${TRACE+-X} $MAVEN_CLI_OPTS $mvn_settings_opt $java_proxy_args enforcer:enforce -Drules=requireReleaseDeps
rules: rules:
# exclude if disabled # exclude if disabled
- if: '$MVN_FORBID_SNAPSHOT_DEPENDENCIES_DISABLED == "true"' - if: '$MVN_FORBID_SNAPSHOT_DEPENDENCIES_DISABLED == "true"'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment