How Do I Deal With the Missing POM File?
Symptoms
The error message is as follows:
1
|
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/xxx/slavespace/slave3/workspace/job_4a1d5be4-b273-4ac8-8d5d-2ee583e71832_1544498089095). Please verify you invoked Maven from the correct directory. |
Cause Analysis
The error information shows that the POM file cannot be found. The default build command attempts to find POM in the root directory of the source code. This error indicates that POM is not in the root directory.
For example, the following screenshot shows that POM does not exist in the root directory of the source code. Instead, it is in the server directory.
Solution
Modify the default build command. The following takes the preceding source code structure as an example. Select either one of the following solutions.
- Run the cd server command to go to the server directory, and then run the mvn command.
- Add -f ./server/pom.xml to the end of the mvn command to specify the path of POM.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot