git-commit-id-plugin maven插件笔记(git commitId跟踪工具)

文章目录

      • maven依赖
      • [git.properties 例子](#git.properties 例子)

代码版本管理比较混乱,如何记录呢?
一种是手动记录,也可以实现,显得有点笨。
也可以通过插件。

maven依赖

xml 复制代码
<plugin>
  <groupId>pl.project13.maven</groupId>
  <artifactId>git-commit-id-plugin</artifactId>
  <version>4.9.10</version>
</plugin>

在线地址(华为云仓库):

https://repo.huaweicloud.com/repository/maven/pl/project13/maven/git-commit-id-plugin/4.9.10/

这样打包后,解压jar包。BOOT-INF\classes 下会有个文件git.properties 记录提交信息。

git.commit.id就是提交id。

注:使用该工具,注意先提交再打包,这样版本才一致。

git.properties 例子

bash 复制代码
#Generated by Git-Commit-Id-Plugin
git.branch=zktest
git.build.host=a-ttt-1
git.build.time=2024-05-30T16\:41\:00+0800
git.build.user.email=ttt@test
git.build.user.name=ttt
git.build.version=0.0.1-SNAPSHOT
git.closest.tag.commit.count=
git.closest.tag.name=
git.commit.author.time=2024-05-30T09\:46\:31+0800
git.commit.committer.time=2024-05-30T09\:46\:31+0800
git.commit.id=0b55bbbbbbbbbbbd2df32cd67
git.commit.id.abbrev=0b558ad
git.commit.id.describe=0b558ad-dirty
git.commit.id.describe-short=0b558ad-dirty
git.commit.message.full=提交信息
git.commit.message.short=提交信息简写
git.commit.time=2024-05-30T09\:46\:31+0800
git.commit.user.email=ttt@test
git.commit.user.name=ttt
git.dirty=true
git.local.branch.ahead=0
git.local.branch.behind=0
git.remote.origin.url=http\://git.51test/CRM.git
git.tags=
git.total.commit.count=76
相关推荐
love530love3 小时前
【笔记】在 MSYS2(MINGW64)中正确安装 Rust
运维·开发语言·人工智能·windows·笔记·python·rust
xhyu614 小时前
【学习笔记】On the Biology of a Large Language Model
笔记·学习·语言模型
小白杨树树4 小时前
【SSM】SpringMVC学习笔记7:前后端数据传输协议和异常处理
笔记·学习
海棠蚀omo5 小时前
C++笔记-C++11(一)
开发语言·c++·笔记
阑梦清川6 小时前
HZOJ新手村前段时间的刷题的笔记
笔记
FakeOccupational6 小时前
【p2p、分布式,区块链笔记 MESH】Bluetooth蓝牙通信拓扑与操作 BR/EDR(经典蓝牙)和 BLE
笔记·分布式·p2p
司徒小夜6 小时前
处理git没做修改,但是文件显示变更的情况
git
m0_749317527 小时前
vscode里如何用git
ide·git·vscode
Hello.Reader8 小时前
Git 安装全攻略Linux、macOS、Windows 与源码编译
linux·git·macos