Reputation: 1266
In jenkins I have configured maven job. Configured "Root POM" with
(/home/sdiuser/Build-Release/maven_artifactid/) and also tried with (/home/sdiuser/Build-Release/maven_artifactid/pom.xml).
But it is saying no such file or directory.
/home/sdiuser/Build-Release/maven_artifactid/pom.xml
No such file: ‘/home/sdiuser/Build-Release/maven_artifactid/pom.xml’
But the files are there.
[sdiuser@usboss-sdijenkins Build-Release]$ ls -lrt /home/sdiuser/Build-Release/maven_artifactid/
total 12
-rw-rw-r--. 1 sdiuser sdiuser 767 Aug 31 03:01 pom.xml
drwxrwxr-x. 4 sdiuser sdiuser 4096 Aug 31 03:01 src
drwxrwxr-x. 7 sdiuser sdiuser 4096 Aug 31 03:02 target
Jenkins Output
Building in workspace /var/lib/jenkins/jobs/maven-test/workspace
Parsing POMs
ERROR: No such file /home/sdiuser/Build-Release/maven_artifactid/pom.xml
Perhaps you need to specify the correct POM file path in the project configuration?
Finished: FAILURE
Upvotes: 4
Views: 19911
Reputation: 2683
The problem is the missing x
right on the folder, so Jenkins is not allowed to search the directory. Try chmod +x /home/sdiuser/Build-Release/maven_artifactid
and repeat.
Upvotes: 1
Reputation: 31
It seems like Jenkins user does not have rights to access folder where pom.xml is stored.
Upvotes: 0
Reputation: 21
put your pom inside workspace.Jenkins will find it automatically, else there might be some Access issues with the file or folder path
Upvotes: 0
Reputation: 111565
As the inline "Root POM" documentation mentions, your POM should be in the Jenkins workspace, and any path you enter should be relative.
In general with Jenkins, you should not hardcode paths — you should let Jenkins check out a local copy of the code into the build workspace, i.e. use the Git plugin or Subversion plugin, or whatever you use.
Assuming your project root is the Build-Release
folder, once you configure Jenkins to check that out, you can set maven_artifactid/pom.xml
as your Root POM and Jenkins should find it.
Upvotes: 0