简体   繁体   English

如果pom在多个目录中(A / B / C / pom.xml),则在将源代码移至Gitlab之后,Jenkins没有调用正确的POM文件。

[英]Jenkins is not invoking the correct POM file after moving the source code to Gitlab if the pom is inside the multiple directory(A/B/C/pom.xml)

Recently we upgraded the Jenkins to 1.596.3 and everything was working fine. 最近,我们将Jenkins升级到1.596.3,一切正常。 The source code version tool was mercurial. 源代码版本工具很普通。 After few days we migrated the source code from Mercurial to git and then we installed the git plugin in Jenkins to connect to git repository and checkout the source code. 几天后,我们将源代码从Mercurial迁移到git,然后在Jenkins中安装了git插件,以连接到git存储库并签出源代码。 We are able to checkout the source code successfully.The issue which appeared that is “ERROR: Failed to parse POMs” 我们能够成功签出源代码。出现的问题是“错误:无法解析POM”

Git client plugin 1.17.1 Git plugin 2.5.2 Git server plugin 1.6 Jenkins version 1.596.3 Git客户端插件1.17.1 Git插件2.5.2 Git服务器插件1.6 Jenkins版本1.596.3

SOURCE CODE STRUCTURE trunk/HPAXXXXNav/
             |---ABC----|-------SRC AND POM.XML
             |---DEF----|--------SRC AND POM.XML
             |---POM.XML

They are calling the POM.XML file from Jenkins so the path is trunk/HPAXXXXNav/ABC/POM.XML 他们正在从Jenkins调用POM.XML文件,因此路径为trunk / HPAXXXXNav / ABC / POM.XML

When I see the console log of the Jenkins it is throwing this error ERROR: 当我看到Jenkins的控制台日志时,抛出此错误ERROR:

Failed to parse POMs
processing instruction can not have PITarget with reserveld xml name (position: START_DOCUMENT seen \r\n<?xml ... @2:7)  @ 

and it is showing in the console log that is trying to invoke the trunk//HPAXXXXNav/POM.XML file which is not the path provide in the Jenkins job.The path provided is trunk/HPAXXXXNav/ABC/POM.XML 它显示在控制台日志中,该日志试图调用trunk // HPAXXXXNav / POM.XML文件,该文件不是Jenkins作业中提供的路径。提供的路径是trunk / HPAXXXXNav / ABC / POM.XML

I have another job where the structure is below and is working fine.The path in the job is trunk//HPAXXXXNav/POM.XML 我还有另一个工作,结构在下面,并且工作正常。工作中的路径是trunk // HPAXXXXNav / POM.XML

trunk/HPAXXXXNav/
             |----ABC
             |----POM.XML

I am not sure whether this is a Jenkins and Git plugin issue and not able to call the correct pom.xml file if it is inside the multiple directory structure (A/B/C/pom.xml)as given in the above description because the same structure is working fine with Mercurial. 我不确定这是否是Jenkins和Git插件问题,并且如果位于上述说明中给出的多目录结构(A / B / C / pom.xml)中,则无法调用正确的pom.xml文件,因为Mercurial可以使用相同的结构。 Can someone let me know the issue? 有人可以让我知道这个问题吗?

 ERROR: Failed to parse POMs processing instruction can not have > PITarget with reserveld xml name (position: START_DOCUMENT seen \\r\\n<?xml ... @2:7) @ 

Seems as there is a line break in the first line ( \\r\\n ). 似乎第一行( \\r\\n )中有换行符。 Try to remove that. 尝试删除它。 When trunk//HPAXXXXNav/POM.XML is the parent of trunk/HPAXXXXNav/ABC/POM.XML Maven needs to parse both that's why you get the error on that file. trunk//HPAXXXXNav/POM.XMLtrunk/HPAXXXXNav/ABC/POM.XML的父级时,Maven需要解析两者,这就是在该文件上出现错误的原因。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM