Search code examples
gitgithubjenkinsjenkins-pipelinejenkins-plugins

Jenkins could not locate pom.xml of the project


I have a created a job for mavenized github project. When I build it, I am getting the error as unable to locate pom.xml under jenkins_dir/workspace/build_name. But when I look into Jenkins directory I could see that Jenkins has cloned the project from GitHub to it's workspace under jenkins_dir/workspace/build name/project name/pom.xml but it is looking for pom in jenkins_dir/workspace/build name. Am I missing some configuration?


Solution

  • Yes I think your configuration is a little off. Assuming your job type is a Maven Project, and given you have said Jenkins is currently looking for the pom file in

    jenkins_dir/workspace/build name 
    

    you should change the Root POM field to

    "project name/pom.xml"
    

    Paths in Jenkins are workspace-relative.