Unable to build maven project, pom.xml file not found

寵の児 提交于 2019-12-25 08:29:31

问题


We recently lost (i.e they died after SAN failure) build VMs for an inhouse application. Unfortunately, these VMs were never backed up.

The devs that set this environment up have moved on and now I'm trying get these VMs going again as mods are required to this inhouse application. I'm a sys admin not a developer and this is proving harder than I thought...

The VMs that died were a TeamCity server and an Artifactory server.

I've built a new VM with both TeamCity and Artifactory (it should be lightly loaded enough to handle it). I have TeamCity talking to the git repo but when I try and build the project, I get

Non-readable POM /srv/teamcity/10.0.4/buildAgent/work/b20d5a085d491430/webview/pom.xml: /srv/teamcity/10.0.4/buildAgent/work/b20d5a085d491430/webview/pom.xml (No such file or directory)

Looking on the file system, indeed there is no pom.xml file at /srv/teamcity/10.0.4/buildAgent/work/b20d5a085d491430/webview. There is however a pom.xml file in /srv/teamcity/10.0.4/buildAgent/work/b20d5a085d491430.

Any pointers on how to get Maven to look one directory up for this file?

Thanks

Edit: Apologies all, I just found that I hadn't correctly defined the "VCS Root", I done that now and am getting further although the project still doesn't build. I'll poke it some more and see how I go.


回答1:


I just found that I hadn't correctly defined the "VCS Root".




回答2:


I faced similar issue. Solution is: Please check the module name in parent POM and child pom, both name should be same.




回答3:


Adding to that Teamcity build using maven thrown me same kind of error with the below message

The project (/opt/buildagent/work/d1df6864f98d2599/pom.xml) has 1 error Non-readable POM /opt/buildagent/work/d1df6864f98d2599/pom.xml: /opt/buildagent/work/d1df6864f98d2599/pom.xml (No such file or directory)

for me it solved by creating VCSRoot configuration



来源:https://stackoverflow.com/questions/42059909/unable-to-build-maven-project-pom-xml-file-not-found

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!