Maven Release Changelist Policy

Versioning policy for use with Maven's maven-release-plugin, specifies a versioning scheme where the CI friendly Maven property 'changelist' is used instead of '-SNAPSHOT'.

License

License

Categories

Categories

Maven Build Tools
GroupId

GroupId

com.m-creations
ArtifactId

ArtifactId

maven-release-changelist-policy
Last Version

Last Version

1.3
Release Date

Release Date

Type

Type

jar
Description

Description

Maven Release Changelist Policy
Versioning policy for use with Maven's maven-release-plugin, specifies a versioning scheme where the CI friendly Maven property 'changelist' is used instead of '-SNAPSHOT'.
Project URL

Project URL

https://github.com/m-creations/maven-release-changelist-policy
Source Code Management

Source Code Management

https://github.com/m-creations/maven-release-changelist-policy/tree/master

Download maven-release-changelist-policy

How to add to project

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

Dependencies

compile (3)

Group / Artifact Type Version
org.apache.maven.release : maven-release-api jar 3.0.0-M1
org.apache.maven.release : maven-release-manager jar 3.0.0-M1
org.apache.commons : commons-lang3 jar 3.12.0

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 Changelist Policy

The code in this repo was originally created by Keir Lawson and demonstrated nicely how to implement a 'yearly' release strategy for use with Maven's maven-release-plugin. I just modified it to implement the following, much simpler strategy:

The development version which is created after the release contains the Maven friendly '${changelist}' instead of '-SNAPSHOT'.

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.

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 changelist, along with adding a dependency to this artifact, like so:

<plugin>
  <artifactId>maven-release-plugin</artifactId>
  <version>3.0.0-M1</version>
  <configuration>
    <projectVersionPolicyId>changelist</projectVersionPolicyId>
  </configuration>
  <dependencies>
    <dependency>
      <groupId>com.m-creations</groupId>
      <artifactId>maven-release-changelist-policy</artifactId>
      <version>1.0</version>
    </dependency>
  </dependencies>
</plugin>

And do not forget to specify a default property changelist:

<properties>
  <changelist>-SNAPSHOT</changelist>
</properties>
com.m-creations

m-creations

Versions

Version
1.3
1.0