jenkins修改pom文件,没有这样的文件:jenkins中出现'pom.xml'错误

本文介绍了一位开发者尝试使用Jenkins部署位于Bitbucket上的Maven项目的经历及遇到的问题。主要问题是Jenkins在构建过程中无法正确找到项目的pom.xml文件。文中详细解释了如何在Jenkins中正确配置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 :

4ad14c42141373cb39e4565ab29c4497.png

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值