gpt4 book ai didi

git - Jenkins 无法识别 git 子目录

转载 作者:行者123 更新时间:2023-12-04 10:59:45 46 4
gpt4 key购买 nike

我是 Jenkins 的新手,只是试图构建/运行我的第一个 Spring 启动应用程序。

这是我的示例 git 存储库 url,我正在尝试将其加载到 Jenkins。

https://github.com/LogeshLohit/thymeleaf-sb-test.git

我像这样检查了应用程序,
enter image description here

当我尝试构建应用程序时,它抛出此错误“[错误] 您指定的目标需要执行一个项目,但此目录 (D:\Program Files\Jenkins_new\workspace\path1) 中没有 POM。请验证您从正确的目录调用 Maven。-> [帮助 1]"

在我的本地存储库中,项目位于“D:\Program Files\Jenkins_new\workspace\path1\thymeleaf-test”,但 jenkins 只查看“D:\Program Files\Jenkins_new\workspace\path1”(来自日志)我猜。

如何让 Jenkins 向下查找一个文件夹,以便在其子目录中找到 pom.xml?

最佳答案

在调用顶级 maven 目标步骤中,单击高级...
POM [ rel_path/to/pom.xml ]
相对于工作区根。在你的情况下,那是 thymeleaf-test/pom.xml
我想也应该可以使用 command line option 进行调用:
-f,--file <arg>强制使用备用 POM 文件(或带有 pom.xml 的目录)。

关于git - Jenkins 无法识别 git 子目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58898833/

46 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com