Skip to content

Latest commit

 

History

History
466 lines (316 loc) · 13 KB

CHANGELOG.md

File metadata and controls

466 lines (316 loc) · 13 KB

Maven Git Versioning Extension Changelog

Maven Central

Changelog

9.3.4

Fixes
  • ignore ci/cd environment if head SHA hash is not matching environment variable commit hash

9.3.3

Fixes
  • fix value of describe.tag.version placeholder

9.3.2

Fixes
  • automatically add git version plugin to maven enforcer unCheckedPluginList #171

9.3.1

Fixes
  • Extend gitlab ci support for env var CI_MERGE_REQUEST_SOURCE_BRANCH_NAME #218

9.3.0

Features
  • add new placeholders
    • ${describe.tag.version.patch.plus.describe.distance}
    • ${describe.tag.version.patch.next.plus.describe.distance}
    • ${describe.tag.version.label.plus.describe.distance}
    • ${describe.tag.version.label.next.plus.describe.distance}

9.2.0

Features
  • new placeholder
    • ${build.timestamp} maven-build-timestamp (epoch seconds) e.g. '1560694278'
    • ${build.timestamp.year} maven-build-timestamp year e.g. '2021'
    • ${build.timestamp.year.2digit} 2-digit maven-build-timestamp year.g. '21'
    • ${build.timestamp.month} maven-build-timestamp month of year e.g. '12'
    • ${build.timestamp.day} maven-build-timestamp day of month e.g. '23'
    • ${build.timestamp.hour} maven-build-timestamp hour of day (24h)e.g. '13'
    • ${build.timestamp.minute} maven-build-timestamp minute of hour e.g. '59'
    • ${build.timestamp.second} maven-build-timestamp second of minute e.g. '30'
    • ${build.timestamp.datetime} maven-build-timestamp formatted as yyyyMMdd.HHmmsse.g. '20190616.161442'

9.1.0

Features
  • add config option for <projectVersionPattern> to use special parts of the project version as placeholders e.g. ${version.environment}
  • add placeholder ${version.core} the core version component of ${version} e.g. '1.2.3'
    • ${version.release} is marked as deprecated

9.0.1

Fixes
  • handle lightweight tags
  • set ${version.minor.next} placeholders properly

9.0.0 (accidentally increased major version, D'OH )

Fixes
  • fix git describe tag selection, if multiple tags point to head
  • add missing ${version.label.prefixed} placeholder

8.0.1

Fixes
  • handle multiline config elements in maven-git-versioning-extension.xml

8.0.0

Features
  • migrate to java 11
  • placeholder
    • new
      • ${version.major.next}
      • ${version.minor.next}
      • ${version.patch.next}
      • ${describe.tag.version}
      • ${describe.tag.version.major}
      • ${describe.tag.version.major.next}
      • ${describe.tag.version.minor}
      • ${describe.tag.version.minor.next}
      • ${describe.tag.version.path}
      • ${describe.tag.version.patch.next}
    • removed
      • ${version.minor.prefixed}
      • ${version.patch.prefixed}
BREAKING CHANGES
  • drop support for java 8

7.4.0

Features
  • add additional version component placeholders (#182)
  • ${version.minor.prefixed} like ${version.minor} with version component separator e.g. '.2'
  • ${version.patch.prefixed} like ${version.patch} with version component separator e.g. '.3'
  • ${version.label} the version label of ${version} e.g. 'SNAPSHOT'
    • ${version.label.prefixed} like ${version.label} with label separator e.g. '-SNAPSHOT'
BREAKING CHANGES
  • ${version.release} will remove all version labels instead of just the -SNAPSHOT label

7.3.0

Features
  • add additional version component placeholders (#165 @pdkyas)

7.2.3

Fixes
  • fix worktree handling

7.2.0

Features
  • Add <relatedProjects> config option

7.1.3

Fixes
  • fix rootDirectory determination for sub working trees

7.1.2

Fixes
  • proper handle of concurrent module builds

7.1.1

Fixes
  • if a tag is provided (and no branch) the extension behaves like in detached head state
  • if a branch is provided (and no tag) the extension behaves like in attached head state with no tags pointing to head

7.1.0

Features
  • New Placeholder ${commit.timestamp.year.2digit}

7.0.0

Features
  • Add GitHub Actions, GitLab CI and Jenkins environment variable support

    • GitHub Actions: if $GITHUB_ACTIONS == true, GITHUB_REF is considered
    • GitLab CI: if $GITLAB_CI == true, CI_COMMIT_BRANCH and CI_COMMIT_TAG are considered
    • Circle CI: if $CIRCLECI == true, CIRCLE_BRANCH and CIRCLE_TAG are considered
    • Jenkins: if JENKINS_HOME is set, BRANCH_NAME and TAG_NAME are considered
  • Simplify xml configuration (also see BREAKING CHANGES)

    Example: maven-git-versioning-extension.xml

    <configuration xmlns="https://github.com/qoomon/maven-git-versioning-extension" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="https://github.com/qoomon/maven-git-versioning-extension https://qoomon.github.io/maven-git-versioning-extension/configuration-7.0.0.xsd">
    
        <refs>
            <ref type="branch">
                <pattern>.+</pattern>
                <version>${ref}-SNAPSHOT</version>
                <properties>
                    <foo>${ref}</foo>
                </properties>
            </ref>
    
            <ref type="tag">
                <pattern><![CDATA[v(?<version>.*)]]></pattern>
                <version>${ref.version}</version>
            </ref>
        </refs>
    
        <!-- optional fallback configuration in case of no matching ref configuration-->
        <rev>
            <version>${commit}</version>
        </rev>
    
    </configuration>
  • New option to consider tag configs on branches (attached HEAD), enabled by <refs considerTagsOnBranches="true">

    • If enabled, first matching branch or tag config will be used for versioning
  • prevent unnecessary updates of pom.xml to prevent unwanted rebuilds (#129 kudos to @ls-urs-keller)

BREAKING CHANGES
  • There is no default config anymore, if no <ref> configuration is matching current git situation and no <rev> configuration has been defined a warning message will be logged and extension will be skipped.
  • Placeholder Changes (old -> new)
    • ${branch} -> ${ref}
    • ${tag} -> ${ref}
    • ${REF_PATTERN_GROUP} -> ${ref.REF_PATTERN_GROUP}
    • ${describe.TAG_PATTERN_GROUP} -> ${describe.tag.TAG_PATTERN_GROUP}
  • preferTags option was removed
    • use <refs considerTagsOnBranches="true"> instead

6.5.0

Features
  • add git describe version placeholders
    • new placeholders
      • ${describe}
      • ${describe.tag}
        • ${describe.<TAG_PATTERN_GROUP_NAME or TAG_PATTERN_GROUP_INDEX>} e.g. pattern v(?<version>.*) will create placeholder ${describe.version}
      • ${describe.distance}
BREAKING CHANGES
  • no longer provide project property git.dirty due to performance issues on larger projects, version format placeholder ${dirty} is still available

6.4.6

Fixes
  • Fix parent project version handling

6.4.1

Fixes
  • Handle xsi:schemaLocation property in configuration file

6.4.0

Features
  • Improved Logging

6.3.0

Features
  • Add support for environment variables in version formats e.g. ${env.BUILD_NUMBER}

6.2.0

Features
  • add ability to define default or overwrite values for version and property format.
    • default value if parameter value is not set ${paramter:-<DEFAULT_VALUE>} e.g. ${buildNumber:-0}
    • overwrite value if parameter has a value ${paramter:+<OVERWRITE_VALUE>} e.g. ${dirty:+-SNAPSHOT}

6.1.1

Fixes
  • fixed wrong dependency management version updates.

6.1.0

Features
  • add ${dirty.snapshot} placeholder that resolves to -SNAPSHOT if repository is in a dirty state.
    • e.g. <versionFormat>${tag}${dirty.snapshot}</versionFormat>

6.0.6

Fixes
  • fixed NullPointerException when no <commit> config tag exists.

6.0.5

Fixes
  • fixed NullPointerException when no versionFormat is set.

6.0.4

Fixes
  • fixed wrong property replacement.

6.0.3

Fixes
  • fixed NullPointerException when no <plugin><groupId> is undefined.

6.0.2

Fixes
  • fixed NullPointerException caused by accessing wrong element within versioning of pom.xml profile plugin section

6.0.1

Fixes
  • add padding for timestamp related placeholder values.

6.0.0

  • Major refactoring
Features
  • Project <Dependency> and <Plugin> versions will be updated accordingly to git versions
  • Add config option <disable>true</disable> to disable extension by default.
  • Add format placeholder:
    • ${dirty.snapshot}
    • ${commit.timestamp.year}
    • ${commit.timestamp.month}
    • ${commit.timestamp.day}
    • ${commit.timestamp.hour}
    • ${commit.timestamp.minute}
    • ${commit.timestamp.second}
    • Maven CLI properties e.g. mvn ... -Dfoo=bar will be accessible by ${foo} placeholder
BREAKING CHANGES
  • default version format on a branch changed to ${branch}-SNAPSHOT was ${commit}
  • Removed support for project property versioning.disable to disable extension by default, use config option <disable> instead.
  • Replace property regex pattern match with simple name match
    • old regex pattern config <branch|tag|commit> <property> <pattern>
    • new property name config <branch|tag|commit> <property> <name>
  • Remove property value pattern <branch|tag|commit> <property> <valuePattern>
  • Remove format placeholder ${property.name}
  • Rename format placeholder ${property.value} to just ${value}
  • Move temporary git versioned pom.xml from build directory next to original pom.xml (.git-versioned-pom.xml)

5.3.0

Features
  • Add feature to disable extension by default and enable on demand

5.2.1

  • ⚠️ minimal required maven version is now 3.6.3
  • remove workaround for maven 3.6.2 compatibility

5.2.0

Features
  • new version format placeholder ${ref.slug} alike ${ref} with all / replaced by -
  • new property git.ref.slug alike git.ref with all / replaced by -
BREAKING CHANGES
  • minimal required maven version set to 3.6.3

5.1.0

  • ⚠️ accidentally bump minimal required maven version to 3.6.3
  • prevent maven from failing, if project is not part of a git repository. Instead a warning is logged.

5.0.2

  • fix incompatibility with maven version 3.6.2

5.0.0

Features

  • simplify <property> replacement configuration

Fixes

  • add missing dependency vor maven version 3.3

Breaking Changes

  • simplify <property> replacement configuration

    new config

    <gitVersioning>
        <branch>
            <pattern>master</pattern>
            <versionFormat>${version}</versionFormat>
            <property>
                <pattern>revision</pattern>
                <valueFormat>${branch-SNAPSHOT}</valueFormat>
            </property>
        </branch>
    </gitVersioning>

    old config

    <gitVersioning>
        <branch>
            <pattern>master</pattern>
            <versionFormat>${version}</versionFormat>
            <property>
                <pattern>revision</pattern>
                <value>
                    <format>${branch-SNAPSHOT}</format>
                </value>
            </property>
        </branch>
    </gitVersioning>

4.10.2

  • fix verbose logging when disabling extension by flag
  • restrict project versioning to root- and sub-projects

4.10.0

  • provide ${git.dirty} project property

4.8.0

  • set execution phase to INITIALIZE
    • Fix IntelliJ multi-modules project handling.

4.7.0

4.5.0

4.1.0

4.0.0

  • Major Refactoring, Simplification
  • Also available as Gradle Plugin
  • New Provided Project Properties
    • git.ref value of branch of tag name, always set

Breaking Changes

  • Restructured XML Config
    • renamed root tag <configuration> -> <gitVersioning>
    • removed nested structure
    • see Configure Extension
  • Renamed Environment Variables
    • MAVEN_PROJECT_BRANCH -> VERSIONING_GIT_BRANCH
    • MAVEN_PROJECT_TAG -> VERSIONING_GIT_TAG
  • Renamed Maven Parameters
    • -Dproject.branch -> -Dgit.branch
    • -Dproject.tag -> -Dgit.tag
  • Removed Maven Parameters
    • -DgitVersioning - disable the extension by a parameter is no longer supported
  • Renamed Provided Project Properties
    • project.branch -> git.branch
    • project.tag -> git.tag
    • project.commit -> git.commit