De-activate a maven profile from command line

后端 未结 3 571
我在风中等你
我在风中等你 2021-01-31 13:09

I have a profile activated by default in my maven setting file ~/.m2/settings.xml.

Is it possible to deactivate it from the command lin

3条回答
  •  旧巷少年郎
    2021-01-31 14:06

    On a Mac, I got the following error attempting to use '!'

    mvn groupId:artifactId:goal -P!profile-1
    -bash: !profile: event not found
    

    Doing the following works with the '-':

    mvn groupId:artifactId:goal -P-profile1
    

    Alternatively you can do:

    mvn groupId:artifactId:goal -P\!profile1
    

提交回复
热议问题