Maven: How do I activate a profile from command line?

后端 未结 4 1606
梦谈多话
梦谈多话 2020-12-25 09:28

This is a snippet from my pom.xml. I tried the following, but the profile was not activated.

mvn clean install -Pdev1
mvn clean install -P dev1
4条回答
  •  忘掉有多难
    2020-12-25 09:50

    Just remove activation section, I don't know why -Pdev1 doesn't override default false activation. But if you omit this:

    false

    then your profile will be activated only after explicit declaration as -Pdev1

提交回复
热议问题