当我尝试构建我的 Maven 项目时收到此警告。我搜索过谷歌但没有运气。这真的很烦人,因为我想发布我的项目,但它不会在这个警告下工作(我认为)。构建成功,但是当我尝试部署 war 文件时它不起作用(没有错误消息)。我在构建项目时能找到的唯一警告是:
[WARNING] The requested profile "projectname" could not be activated because it does not exist.
最佳答案
如果您的 settings.xml(在您的 .m2 目录中)有以下内容,并且没有 ID 为 projectname 的配置文件,就会发生这种情况。
<activeProfiles>
<activeProfile>projectname</activeProfile>
</activeProfiles>
关于java - 警告无法激活请求的配置文件 "projectname",因为它不存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17613901/