Issue
The following errors will be reported in the jenkins build log:
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (D:\JENKINS-WORK\workspace\Code Quality\DS-SONAR-CASPER). Please verify you invoked Maven from the correct directory. -> [Help 1]
org.apache.maven.lifecycle.MissingProjectException: The goal you specified requires a project to execute but there is no POM in this directory (D:\JENKINS-WORK\workspace\Code Quality\DS-SONAR-CASPER). Please verify you invoked Maven from the correct directory.
The build will fail since maven will not perform a build job.
Environment
- CloudBees Jenkins Operations Center
- CloudBees Jenkins
Resolution
Generally the file/folder path is wrong and can be corrected by specifying the correct path. Both Windows and *nix operating systems also need to have file/folder names escaped if spaces or special characters are used in the names.
Linux Example:
Setting a path to /opt/jenkins/my workspace folder/ will fail because the spaces in between the words “my workspace” and “workspace folder” were not properly escaped.
A more correct expression would be like this:
/opt/jenkins/my\ workspace\ folder/
Windows Example:
Setting a path to C:\jenkins\my workspace folder\ will fail because the spaces in between the words “my workspace” and “workspace folder” were not properly escaped.
A more correct expression would be like this:
C:\jenkins\“my workspace folder”\
Comments
2 comments
Hi Team,
Thank you, it's more helpfull
and now I am facing one issue in Linux (could you please help me to solve this)
issue:
The goal you specified requires a project to execute but there is no POM in this directory (/home/test/.jenkins/AutoApi). Please verify you invoked Maven from the correct directory. -> [Help 1]
solution: need to give correct path to pom.xml file ___ so shell i alter this file path like (/home/test/.jenkins/AutoApi) to (/home/test/.\jenkins/AutoApi)
but it's not working__ could you please help me to resolve this issue
With regards,
Siva T
Hi Sivaprakash
There is nothing that would require escaping in this path: `/home/test/.jenkins/AutoApi`
How do you deliver your source code into that folder? Are you sure your `pom.xml` is there?
If you have a CloudBees subscription, feel free to create a support ticket. If not, it would be best to ask for help via cloudbees community or jenkins.io community
Please sign in to leave a comment.