Versioning Extension for Maven

lib/ext-style extension for Apache Maven that allows manipulation of a version suffix.

License

License

APLv2.0
Categories

Categories

Maven Build Tools
GroupId

GroupId

org.commonjava.maven.ext
ArtifactId

ArtifactId

versioning-extension
Last Version

Last Version

0.7
Release Date

Release Date

Type

Type

jar
Description

Description

Versioning Extension for Maven
lib/ext-style extension for Apache Maven that allows manipulation of a version suffix.
Source Code Management

Source Code Management

http://github.com/jdcasey/maven-versioning-extension

Download versioning-extension

How to add to project

<!-- https://jarcasting.com/artifacts/org.commonjava.maven.ext/versioning-extension/ -->
<dependency>
    <groupId>org.commonjava.maven.ext</groupId>
    <artifactId>versioning-extension</artifactId>
    <version>0.7</version>
</dependency>
// https://jarcasting.com/artifacts/org.commonjava.maven.ext/versioning-extension/
implementation 'org.commonjava.maven.ext:versioning-extension:0.7'
// https://jarcasting.com/artifacts/org.commonjava.maven.ext/versioning-extension/
implementation ("org.commonjava.maven.ext:versioning-extension:0.7")
'org.commonjava.maven.ext:versioning-extension:jar:0.7'
<dependency org="org.commonjava.maven.ext" name="versioning-extension" rev="0.7">
  <artifact name="versioning-extension" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.commonjava.maven.ext', module='versioning-extension', version='0.7')
)
libraryDependencies += "org.commonjava.maven.ext" % "versioning-extension" % "0.7"
[org.commonjava.maven.ext/versioning-extension "0.7"]

Dependencies

provided (2)

Group / Artifact Type Version
org.apache.maven : maven-core jar 3.0.4
org.codehaus.plexus : plexus-component-annotations jar 1.5.5

test (1)

Group / Artifact Type Version
junit : junit jar 4.10

Project Modules

There are no modules declared in this project.

Maven Versioning Extension

A Maven extension which manages the current version of the current project. The extension should be installed in $M2_HOME/lib/ext. When it is activated it will write a log file target/versioning.log.

WARNING : This extension has been deprecated and its functionality rolled into https://github.com/release-engineering/pom-manipulation-ext.

The following configuration is available:

Automatic version increment

The extension can be used to append a version suffix/qualifier to the current project, and then apply an incremented index to the version to provide a unique release version. For example, if the current project version is 1.0.0.GA, the extension can automatically set the version to 1.0.0.GA-rebuild-1, 1.0.0.GA-rebuild-2, etc.

The extension is configured using the property version.incremental.suffix.

mvn install -Dversion.incremental.suffix=rebuild

The Maven repository metadata will be checked to locate the latest released version of the project artifacts, and the next version is selected by the extension.

Manual version suffix

The version suffix to be appended to the current project can be manually selected using the property version.suffix

mvn install -Dversion.suffix=release-1

If the current version of the project is "1.2.0.GA", the new version set during the build will be "1.2.0.GA-release-1".

Snapshot Detection

The extension can detect snapshot versions and either preserve the snapshot or replace it with a real version. This is controlled by the property version.suffix.snapshot. The default is false (i.e. remove SNAPSHOT and replace by the suffix).

mvn install -Dversion.suffix.snapshot=true

This means that the SNAPSHOT suffix will be kept.

Versions

Version
0.7
0.6
0.5
0.4.2
0.4.1
0.4
0.3
0.2
0.1