[英]How to delete dev profile in Intellij? and Why Maven profiles in Intellij has three states?
Erveytime I import a maven project from existing source, Intellij create a dev profile, but there is no such a dev profile in pom.xml. Erveytime我从现有的源中导入了一个maven项目,Intellij创建了一个开发配置文件,但是pom.xml中没有这样的开发配置文件。 Here is my profiles in pom.xml:
这是我在pom.xml中的配置文件:
But, there is a dev profile shown in maven projects window: 但是,maven项目窗口中显示了一个开发人员资料:
How to delete the inexplicable dev profile? 如何删除莫名其妙的开发者资料?
All the checkbox I have seen before have two states: checked or unchecked. 我之前看到的所有复选框都有两种状态:选中或未选中。 However, the checkbox of a profile in Intellij has three states:
但是,Intellij中的配置文件的复选框具有三种状态:
What's the difference? 有什么不同?
To answer Your first question (from my comment): 要回答您的第一个问题(根据我的评论):
the dev profile is defined in your settings.xml . 开发配置文件在settings.xml中定义。
The second question: 第二个问题:
If the checkbox is on, then when you run a maven task from within IntelliJ, the profile is explicitly added to the mvn call with -P dev
. 如果选中此复选框,那么当您在IntelliJ中运行maven任务时,将使用
-P dev
将配置文件显式添加到mvn调用中。
If you switch it off (no checkmark), it is explicitly excluded in the mvn call: -P !dev
. 如果您将其关闭(无复选标记),则它将在mvn调用中被明确排除:
-P !dev
。
And in the third state (grey checkmark) no special profile argument is passed and so wether the profile is active is decided how you defined it in your config. 在第三个状态(灰色选中标记)中,不会传递任何特殊的配置文件参数,因此,配置文件是否有效取决于您如何在配置中定义它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.