maven - 警告无法激活请求的配置文件“本地”
问题描述
我尝试在命令行中执行“mvn”命令,它似乎工作正常,因为 /target 中的输出是正确的。mvn -P dev clean package -DskipTests但是下面的警告会在最后一行连续打印。
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.344 s
[INFO] Finished at: 2021-10-07T14:22:17+09:00
[INFO] ------------------------------------------------------------------------
[WARNING] The requested profile "local" could not be activated because it does not exist.
我显然将配置文件选项声明为“dev”,但是这个警告说请求的配置文件是“本地的”。
为什么此警告一直显示以及如何消失?
这是我在 pom.xml 中的个人资料设置
<profiles>
<profile>
<id>dev</id>
<properties>
<env>dev</env>
</properties>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
<profile>
<id>real</id>
<properties>
<env>real</env>
</properties>
</profile>
</profiles>
解决方案
推荐阅读
- node.js - 如何在不同用户之间创建消息帖子
- sql-server - 将几周累积到季度或期间。如果数据满足所有周的存在
- c++ - Robin carp 实施没有给出预期的结果
- laravel - 将对象转换为数组
- javascript - jQuery(element).offset().top 滚动时暂时不准确
- javascript - 向 matIconRegistry 添加自定义图标?
- html - 如何定位一个从中心垂直偏移的项目,以便它周围的空间随着视口缩小而缩小为零?
- python - 使用任何 Firestore 功能时 Gunicorn Worker 超时 - 甚至不是 get
- build - 如何禁用 Visual Studio 的默认构建并将其替换为自定义构建工具?
- javascript - 制表列可见,使用函数来决定列的可见性