From bf69ff613ff5eae03da4970d83f0c27fc24d5747 Mon Sep 17 00:00:00 2001 From: danielspeicher <daniel.speicher@bitegra-solutions.de> Date: Fri, 5 Mar 2021 13:23:06 +0100 Subject: [PATCH] docker/l3d#87 --- docs/docker/maven-build/index.md | 37 +++++++++++--------------------- 1 file changed, 12 insertions(+), 25 deletions(-) diff --git a/docs/docker/maven-build/index.md b/docs/docker/maven-build/index.md index d5d3d2d..ae0dc1c 100644 --- a/docs/docker/maven-build/index.md +++ b/docs/docker/maven-build/index.md @@ -15,27 +15,8 @@ To use this image in a **_.gitlab-ci.yml_** file, you can specify a build stage stages: - build -build_jar: -stage: build -image: registry.lakedrops.com/docker/maven-build/maven -script: -- mvn clean verify - artifacts: - name: your_artifact_name - paths: -- your_artifact_path -``` - - - -stages: -- build -- deploy - variables: MAVEN_OPTS: "-Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository" -GIT_SUBMODULE_STRATEGY: recursive -JAR_FILE: datacore-real-estate-3.0.0.jar cache: paths: @@ -45,10 +26,16 @@ build_jar: stage: build image: registry.lakedrops.com/docker/maven-build/maven script: -- mvn clean deploy -s ci_settings.xml -artifacts: -name: datacore -paths: -- real-estate/target/${JAR_FILE} - +- mvn clean verify -s ci_settings.xml + artifacts: + name: your_artifact_name + paths: +- your_artifact_path +``` + +In the `script` section you can execute any Maven build step. The `-s ci_settings.xml` option is a proper way to +pass a suitable settings file, which is committed in VCS. +The variable `MAVEN_OPTS` should also be set. Here you can specify the local repository the Maven build +process should use. This directory is also cached, so we avoid to downloading the third party modules +when not necessary. -- GitLab