SpringBoot项目搭建成功!执行mvn clean命令,虽然执行成功,但是出现了如下警告:
The requested profile "pom.xml" could not be activated because it does not exist.
作为有轻微强迫症的我,看着着实不爽,百度一圈,发现大牛给出的解决方案让人目瞪口呆,经过和原来项目对比,发现问题出在项目配置(开发工具)上,在此记录下来,方便遇到同类问题的小伙伴查阅!
处理过程如下图:
- 在当前项目右键选择Properties属性,查看项目配置相关属性
- 未出现上述警告的项目Maven配置如下图:
-
出现上述警告的项目Maven配置如下图:
- 经对比发现此处配置不同,修改Maven配置如图1所示配置,警告消失,mvn clean运行结果如下所示:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building fitch-core 1.0.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ fitch-core ---
[INFO] Deleting D:\dev\var\workspace_sts\fitch-core\target
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.496 s
[INFO] Finished at: 2019-04-18T14:55:40+08:00
[INFO] Final Memory: 12M/243M
[INFO] ------------------------------------------------------------------------
上述是所有处理问题过程。