Maven Release Yearly Policy

Versioning policy for use with Maven's maven-release-plugin, specifies a versioning scheme along the lines of that currently used by IntelliJ, namely year.major.minor.

License

License

Categories

Categories

Maven Build Tools
GroupId

GroupId

com.ncredinburgh
ArtifactId

ArtifactId

maven-release-yearly-policy
Last Version

Last Version

1.0
Release Date

Release Date

Type

Type

jar
Description

Description

Maven Release Yearly Policy
Versioning policy for use with Maven's maven-release-plugin, specifies a versioning scheme along the lines of that currently used by IntelliJ, namely year.major.minor.
Project URL

Project URL

https://github.com/ncredinburgh/maven-release-yearly-policy
Source Code Management

Source Code Management

https://github.com/ncredinburgh/maven-release-yearly-policy/tree/master

Download maven-release-yearly-policy

How to add to project

<!-- https://jarcasting.com/artifacts/com.ncredinburgh/maven-release-yearly-policy/ -->
<dependency>
    <groupId>com.ncredinburgh</groupId>
    <artifactId>maven-release-yearly-policy</artifactId>
    <version>1.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.ncredinburgh/maven-release-yearly-policy/
implementation 'com.ncredinburgh:maven-release-yearly-policy:1.0'
// https://jarcasting.com/artifacts/com.ncredinburgh/maven-release-yearly-policy/
implementation ("com.ncredinburgh:maven-release-yearly-policy:1.0")
'com.ncredinburgh:maven-release-yearly-policy:jar:1.0'
<dependency org="com.ncredinburgh" name="maven-release-yearly-policy" rev="1.0">
  <artifact name="maven-release-yearly-policy" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.ncredinburgh', module='maven-release-yearly-policy', version='1.0')
)
libraryDependencies += "com.ncredinburgh" % "maven-release-yearly-policy" % "1.0"
[com.ncredinburgh/maven-release-yearly-policy "1.0"]

Dependencies

compile (2)

Group / Artifact Type Version
org.apache.maven.release : maven-release-api jar 2.5.3
org.apache.maven.release : maven-release-manager jar 2.5.3

provided (1)

Group / Artifact Type Version
org.codehaus.plexus : plexus-component-annotations jar 1.5.5

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

Build Status Maven Central

Maven Release Yearly Policy

This versioning policy for use with Maven's maven-release-plugin specifies a versioning scheme along the lines of that currently used by IntelliJ, namely year.major.minor.

Whilst not recommended for libraries where major version changes typically communicate breaking API changes, this versioning strategy is more useful for deploying consumer-facing software which does not expose APIs.

Usage

This plugin requires Java 8 along with a recent version of the release plugin. To use in your project edit your POM and set the projectVersionPolicyId configuration property of the maven-release-plugin to yearly, along with adding a dependency to this artifact, like so:

<plugin>
  <artifactId>maven-release-plugin</artifactId>
  <version>2.5.3</version>
  <configuration>
    <projectVersionPolicyId>yearly</projectVersionPolicyId>
  </configuration>
  <dependencies>
    <dependency>
      <groupId>com.ncredinburgh</groupId>
      <artifactId>maven-release-yearly-policy</artifactId>
      <version>1.0</version>
    </dependency>
  </dependencies>
</plugin>

Semantics

Whenever the current year is detected as being the major version of the artifact, the minor version is incremented as one would expect, so 2017.2 becomes 2017.3 and 2017.2.1 becomes 2017.2.2. Where the major component is not the current year then the version is set to the first release of the current year, so in 2018, version 2017.3.2 becomes 2018.1, even if the present SNAPSHOT version is for a 2017 version. For more details on specifc scenarios see the test cases.

com.ncredinburgh

NCR Edinburgh

Versions

Version
1.0