This extension will set project version, based on current Git branch or tag.
GPL-3.0 License
Bot releases are hidden (Show)
Published by qoomon over 2 years ago
Published by qoomon almost 3 years ago
Published by qoomon almost 3 years ago
<relatedProjects>
config optionPublished by qoomon almost 3 years ago
rootDirectory
determination for sub working treesPublished by qoomon almost 3 years ago
Published by qoomon about 3 years ago
Published by qoomon about 3 years ago
${commit.timestamp.year.2digit}
Published by qoomon about 3 years ago
Add GitHub Actions, GitLab CI and Jenkins environment variable support
$GITHUB_ACTIONS == true
, GITHUB_REF
is considered$GITLAB_CI == true
, CI_COMMIT_BRANCH
and CI_COMMIT_TAG
are considered$CIRCLECI == true
, CIRCLE_BRANCH
and CIRCLE_TAG
are consideredJENKINS_HOME
is set, BRANCH_NAME
and TAG_NAME
are consideredSimplify 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">
prevent unnecessary updates of pom.xml
to prevent unwanted rebuilds (#129 kudos to @ls-urs-keller)
<ref>
configuration is matching current git situation and no <rev>
configuration has been${branch}
-> ${ref}
${tag}
-> ${ref}
${REF_PATTERN_GROUP}
-> ${ref.REF_PATTERN_GROUP}
${describe.TAG_PATTERN_GROUP}
-> ${describe.tag.TAG_PATTERN_GROUP}
preferTags
option was removed
<refs considerTagsOnBranches="true">
insteadPublished by qoomon over 3 years ago
Features
${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
git.dirty
due to performance issues on larger projects,${dirty}
is still availablePublished by qoomon over 3 years ago
Fix parent project handling
Published by qoomon over 3 years ago
Published by qoomon over 3 years ago
Improve logs
Published by qoomon over 3 years ago
feat: support for environment variables in version formats
Published by qoomon over 3 years ago
Published by qoomon over 3 years ago
Published by qoomon over 3 years ago
${paramter:-<DEFAULT_VALUE>}
e.g. ${buildNumber:-0}
${paramter:+<OVERWRITE_VALUE>}
e.g. ${dirty:+-SNAPSHOT}
Published by qoomon over 4 years ago
<property>
replacement configurationsimplify <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>
Published by qoomon over 4 years ago