semver-maven-plugin

a plugin check project.version complies semantic versioning

License

License

Categories

Categories

Maven Build Tools
GroupId

GroupId

com.github.jinahya
ArtifactId

ArtifactId

semver-maven-plugin
Last Version

Last Version

0.0.1
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

semver-maven-plugin
a plugin check project.version complies semantic versioning
Source Code Management

Source Code Management

https://github.com/jinahya/semver-maven-plugin

Download semver-maven-plugin

How to add to project

<plugin>
    <groupId>com.github.jinahya</groupId>
    <artifactId>semver-maven-plugin</artifactId>
    <version>0.0.1</version>
</plugin>

Dependencies

compile (2)

Group / Artifact Type Version
org.apache.maven : maven-plugin-api jar 3.3.9
org.apache.maven : maven-project jar 3.0-alpha-2

provided (1)

Group / Artifact Type Version
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.4

test (3)

Group / Artifact Type Version
ch.qos.logback : logback-classic jar 1.1.3
org.apache.maven.shared : maven-verifier jar 1.6
org.testng : testng jar 6.9.9

Project Modules

There are no modules declared in this project.

semver-maven-plugin

Dependency Status a plugin checks whether project's version compiles semantic versioning.

usages

Add this plugin.

<plugin>
  <groupId>com.github.jinahya</groupId>
  <artifactId>semver-maven-plugin</artifactId>
</plugin>

constraints

level 1: entire version string

The entire version string(@{project.version}) is checked for pattern matching with follwing expression.

(\d+)\.(\d+)\.(\d+)(-([^\+]*))?(\+(.+))?
-----  -----  -----  ---------    -----
X     .Y     .Z     -R           +M

level 2

Normal versions

Each normal versions(X, Y, and Z) checked by following constraints

  • Must be non-negative integers.
  • Must not contain leading zeros. Note that single 0 is valid.

Pre-release version

  • Each dot separated identifiers must match [0-9A-Za-z-]+.
  • When there are only numeric characters, no leading zeros are allowed.

Build metadata

  • Each dot separated identifiers must match [0-9A-Za-z-]+.
  • Leading zeros are allowed even if there are only numeric characters.

Versions

Version
0.0.1