当前位置:网站首页>The goal you specified requires a project to execute but there is no POM

The goal you specified requires a project to execute but there is no POM

2022-06-26 18:42:00 JobsTribe

jenkins Cannot pack normally .

Problem description

jenkins Wrong packing , Unable to start the service properly .

[WARNING] The requested profile "dev" could not be activated because it does not exist.
[WARNING] The requested profile "uat" could not be activated because it does not exist.
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/var/lib/jenkins/workspace/ali-op-job). Please verify you invoked Maven from the correct directory. -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException

Cause analysis

pom The file cannot be found .

pom The file is not in workspace In the project directory in . There is no error in viewing the configuration when packaging .

Then check it out jenkins Where the configuration is located jenkins Server for , Find the code pulled down from the server pom File name is pomaa .xml.

Think of someone who changed pom The name of the document , But in idea This is not shown in pomaa.xml The name of , That led to it. pom The file cannot be found .

terms of settlement

take pomaa.xml Change the document to po m.xml And submit to svn Then you can .

Perfect solution !

Related to recommend

Another reason :

Check and find that there is one more level of subdirectory below , in other words pom The file is not in workspace In the project directory in . So it will lead to maven Can't find pom file . therefore , When I build, I directly add an action to enter the actual directory of the project before the construction , Building , There won't be a problem .

https://blog.csdn.net/longzhizhui926/article/details/83116473

原网站

版权声明
本文为[JobsTribe]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/177/202206261809249457.html