Both commands are correct :
mvn clean install -Pdev1 mvn clean install -P dev1
The problem is most likely not profile activation, but the profile not accomplishing what you expect it to.
It is normal that the command :
does not display the profile, because is does not contain
-Pdev1. You could add it to make the profile appear, but it would be pointless because you would be testing maven itself.
What you should do is check the profile behavior by doing the following :
truein the profile configuration,
mvn help:active-profiles(to make sure it is effectively
activated even without
It should give the same results as before, and therefore confirm that the problem is the profile not doing what you expect.
Leave an answer