diff --git a/pom.xml b/pom.xml
index 923a565d..43cf8d20 100644
--- a/pom.xml
+++ b/pom.xml
@@ -67,6 +67,8 @@
UTF-8
${project.build.sourceEncoding}
false
+ ^\d(\.\d+)?\.(\d+|x)-SNAPSHOT$
+ ^\d\.\d+\.\d+(-(Alpha|Beta|RC)\d+)?$
4.8.2
3.0.2
@@ -305,10 +307,6 @@
-
-
- 3.3.9
-
+
+ 3.3.9
+
+
+
+ project.version
+ ${maven.enforcer.pom.version.regex}
+ Project version(${project.version}) format is invalid!
+
@@ -511,6 +519,7 @@
+
enforce-when-release
@@ -532,12 +541,6 @@
21
-
-
- project.version
- ^\d\.\d+\.\d+(-(Alpha|Beta|RC)\d+)?$|^\d(\.\d+)?\.(\d+|x)-SNAPSHOT$
- "Project version(${project.version}) format is invalid!"
-
${maven.compiler.source}
@@ -557,6 +560,32 @@
+
+ enforce-project-version-when-release
+
+
+ performRelease
+ true
+
+
+
+ ${release.pom.version.regex}
+
+
+
+ enforce-project-version-when-github-actions-triggered-by-tag
+
+
+
+ env.GITHUB_REF_TYPE
+ tag
+
+
+
+ ${release.pom.version.regex}
+
+
+
gen-src
diff --git a/scripts/integration_test b/scripts/integration_test
index 28a1778b..912ac546 100755
--- a/scripts/integration_test
+++ b/scripts/integration_test
@@ -31,7 +31,7 @@ readonly JDK_VERSIONS=(
# shellcheck disable=SC2034
readonly MVU_MVN_OPTS=(
"${MVU_DEFAULT_MVN_OPTS[@]}"
- -DperformRelease -P'!gen-sign'
+ -DperformRelease -P'!gen-sign' -P'!enforce-project-version-when-release'
${CI_MORE_MVN_OPTS:+${CI_MORE_MVN_OPTS}}
)