Skip to content

Commit

Permalink
chore: add pom version check
Browse files Browse the repository at this point in the history
  • Loading branch information
oldratlee committed Dec 4, 2023
1 parent cf9749b commit 02dc0b9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,23 @@
</rules>
</configuration>
</execution>
<execution>
<id>enforce-property</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<!-- https://maven.apache.org/enforcer/enforcer-rules/requireProperty.html -->
<requireProperty>
<property>project.version</property>
<regex>^\d\.\d+\.\d+(-(Alpha|Beta|RC)\d+)$|^\d(\.\d+)?\.(\d+|x)-SNAPSHOT$</regex>
<regexMessage>"Project version(${project.version}) format is invalid!"</regexMessage>
</requireProperty>
</rules>
<fail>true</fail>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
Expand Down

0 comments on commit 02dc0b9

Please sign in to comment.