从github release处下载源码,或者从工程首页下载源码会编译失败,提示如下
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 51.504 s
[INFO] Finished at: 2019-11-04T20:27:21+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal pl.project13.maven:git-commit-id-plugin:2.1.5:revision (default) on project distribution: .git directory could not be found! Please specify a valid [dotGitDirectory] in your pom.xml -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
原因是项目中有个git的插件需要读取当前工程的提交信息,github打包的源码没有git信息,所以就打包失败。 解决办法:git clone下载