I have created sample project to reproduce the issue.
This first sample works fine - you can activate/deactivate profiles as you want, dependencies will be resolved fine:
https://github.com/lfryc/m2e-profile-activation-test/blob/master/pom.xml
But with second sample, I have added property activation to both profiles.
https://github.com/lfryc/m2e-profile-activation-test/blob/property-activation/pom.xml
Command-line usage is then:
$ mvn install -Djsf_profile=jsf_ri
or
$ mvn install -Djsf_profile=myfaces
But when used with M2E, property activation is not supported.
Thus I activate myfaces profile and deactivate jsf_ri profile.
Leading into following setup: "!jsf_ri, myfaces"
I expect only myfaces profile dependencies imported, but both, jsf_ri and myfaces dependencies are imported in this case.
----
Am I doing something wrong? Is this expected to work?
Can be profile deactivated no matter what activation it defines in POM?