From d7c2da14743a385dd13783a953b8a140ab0bca27 Mon Sep 17 00:00:00 2001
From: Girija Saint Ange <girija.saintange@gmail.com>
Date: Thu, 3 Feb 2022 15:22:39 +0000
Subject: [PATCH] fix: Use Dmaven.test.skip to avoid compiling and running
 tests instead of DskipTests

---
 README.md                     | 4 ++--
 templates/gitlab-ci-maven.yml | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/README.md b/README.md
index 7c0ee2d..c0c6bb7 100644
--- a/README.md
+++ b/README.md
@@ -170,8 +170,8 @@ They are bound to the `publish` stage, and use the following variables:
 | ----------------------------------- | ------------------------------------------------------------ | ----------------- |
 | `MAVEN_DEPLOY_ENABLED`              | Set to `true` to enable a publish jobs                            | _none_ (disabled) |
 | `MAVEN_DEPLOY_FROM_UNPROTECTED_DISABLED`       | Set to `true` to limit snapshot publication to protected branches | _none_ (disabled) |
-| `MAVEN_DEPLOY_ARGS`                 | Maven arguments for the Snapshot job                         | `deploy -DskipTests` |
-| `MAVEN_RELEASE_ARGS`                | Maven arguments for the Release job                          | `release:prepare release:perform -Darguments=-DskipTests` |
+| `MAVEN_DEPLOY_ARGS`                 | Maven arguments for the Snapshot job                         | `deploy -Dmaven.test.skip=true` |
+| `MAVEN_RELEASE_ARGS`                | Maven arguments for the Release job                          | `release:prepare release:perform -Darguments=-Dmaven.test.skip=true` |
 | `MAVEN_RELEASE_SCM_COMMENT_PREFIX`  | Maven release plugin [scmCommentPrefix](https://maven.apache.org/maven-release/maven-release-plugin/prepare-mojo.html#scmCommentPrefix) parameter  | `[ci skip][maven-release-plugin]` |
 | `MVN_SEMREL_RELEASE_DISABLED`  | Set to `true` to disable [semantic-release integration](#semantic-release-integration)   | `[ci skip][maven-release-plugin]` |
 
diff --git a/templates/gitlab-ci-maven.yml b/templates/gitlab-ci-maven.yml
index c21b185..552d0b1 100644
--- a/templates/gitlab-ci-maven.yml
+++ b/templates/gitlab-ci-maven.yml
@@ -76,10 +76,10 @@ variables:
     -Dformats=HTML,JSON,XML
   
   # Maven deploy arguments
-  MAVEN_DEPLOY_ARGS: "deploy -DskipTests"
+  MAVEN_DEPLOY_ARGS: "deploy -Dmaven.test.skip=true"
 
   # Maven release arguments
-  MAVEN_RELEASE_ARGS: "release:prepare release:perform -Darguments=-DskipTests"
+  MAVEN_RELEASE_ARGS: "release:prepare release:perform -Darguments=-Dmaven.test.skip=true"
   MAVEN_RELEASE_SCM_COMMENT_PREFIX: "[ci skip][maven-release-plugin]"
 
 stages:
-- 
GitLab