1、错误描述:在执行maven clean的时候有时会出现 The requested profile “pom.xml” could not be activated because it does not exist 的错误。
1 [INFO] Scanning for projects...
2 [INFO]
3 [INFO] --------------------------< com.example:demo >--------------------------
4 [INFO] Building demo 0.0.1-SNAPSHOT
5 [INFO] --------------------------------[ jar ]---------------------------------
6 [INFO]
7 [INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ demo ---
8 [INFO] Deleting D:\eclipse\workspace_spring\demo\target
9 [INFO] ------------------------------------------------------------------------
10 [INFO] BUILD SUCCESS
11 [INFO] ------------------------------------------------------------------------
12 [INFO] Total time: 1.951 s
13 [INFO] Finished at: 2020-11-23T10:52:01+08:00
14 [INFO] ------------------------------------------------------------------------
15 [WARNING] The requested profile "pom.xml" could not be activated because it does not exist.
解决办法:在项目中单击右键 -->属性 -->maven,将此处清空保存即可。
![](https://i-blog.csdnimg.cn/blog_migrate/9c36e7265f7bac211f44f48c4478a23e.png)