简体   繁体   中英

How to delete dev profile in Intellij? and Why Maven profiles in Intellij has three states?

Question 1:

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. Here is my profiles in pom.xml:

在此处输入图片说明

But, there is a dev profile shown in maven projects window:

在此处输入图片说明

How to delete the inexplicable dev profile?

Question 2:

All the checkbox I have seen before have two states: checked or unchecked. However, the checkbox of a profile in Intellij has three states:

在此处输入图片说明

在此处输入图片说明

在此处输入图片说明

What's the difference?

To answer Your first question (from my comment):

the dev profile is defined in your 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 .

If you switch it off (no checkmark), it is explicitly excluded in the mvn call: -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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM