没有这样的文件:jenkins中出现'pom.xml'错误 [英] No such file: ‘pom.xml’ error in jenkins
问题描述
我在 Bitbucket
中有一个存储库。在该仓库中,我有一个名为 Demo
这是一个 maven
项目的项目。我试图用 Jenkins
部署 Demo 。
。。
- 在Jenkins中创建了一个工作(Item)。
-
配置(这是各个作业的配置)。
项目名称:Demo。
$ b描述:bla bla bla ..
源代码管理 - > Git - > 存储库网址:git@bitbucket.org:UserName / ProjectName.git。
- > 凭证:提供我的凭证。
建立 - >根目录POM:
pom。 xml
。
一切看起来不错,但pom.xml引发错误:
由于这是maven项目,它正在寻找pom.xml,我在提供路径时感到困惑。因为Jenkins正在汇集来自Bitbucket的源代码,该代码在Demo项目下有pom.xml。
但我不知道在这里提供哪条路径。
您必须提及应用程序的pom.xml相对于jenkins工作空间的路径。
一旦Jenkins开始构建,它会将源代码下载到.jenkins \jobs\yourjobname\workspace并在那里建立它,如果你是不知道pom路径。
例如对于应用程序Test .jenkins \jobs\jenkinsJobName\workspace\Test\pom.xml
根pom字段应该是Test \pom.xml
I have a repository in Bitbucket
. In that repository i have project called Demo
Which is a maven
project. I am trying to deploy Demo
with Jenkins
.
Steps I am following.
- Created a job(Item) in Jenkins.
Configure(This is the configuration for the individual jobs).
Project name:Demo.
Description:bla bla bla..
Source Code Management -> Git -> Repository URL :git@bitbucket.org:UserName/ProjectName.git.
->Credentials: provided my credential.
Build-> Root POM :
pom.xml
.
Everything looks fine but pom.xml throwing error saying :
Since this is the maven project it is looking for pom.xml, and I am confuse while providing the path. since Jenkins is pooling source from Bitbucket, which have pom.xml under Demo project.
But I do not know which path to provide here.
You have to mention the path of your application's pom.xml in relation to jenkins work space.
Once Jenkins build starts it will download the source code to .jenkins\jobs\yourjobname\workspace and builds it there, you can check this location if you are not sure of the pom path.
E.g For an application Test .jenkins\jobs\jenkinsJobName\workspace\Test\pom.xml
The root pom field should be Test\pom.xml
这篇关于没有这样的文件:jenkins中出现'pom.xml'错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!