diff --git a/docs/docker/maven-build/index.md b/docs/docker/maven-build/index.md index d5d3d2d52195819f562d5bb9db60480c8a52a88b..ae0dc1ca7aedc1a577d7b84440406766c99f26cc 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.