Maven cannot find git

Maven cannot find git

本文关键字:git find cannot Maven      更新时间:2023-10-16

我正在尝试构建一个maven项目。这是一个可以在这个链接中找到的项目:

https://www.openmicroscopy.org/site/support/bio-formats5.0/developers/BF-CPP-windows.html

我有这个错误:

maven - execute failed: java.io.ioexception: cannot run program git

我在这个路径中安装了git,并将其添加到我的环境变量中。

C:/Users/xxxxx/AppData/Local/Programs/Git/cmd/git.exe

我不明白maven怎么找不到git

请帮忙吗?

您的问题与maven或git无关。我看了一下你要用的pom。在某个时刻,$PATH中会出现预期的"git"!因此,请确保您的系统$PATH中有git,这意味着通过打开终端/命令提示符并键入git可以使其工作。