How to activate maven profile from command line (to build subsystem)
I have a Maven project https://github.com/paulvi/MavenMultiModule1 with root pom.xml as <modules> <module>MavenModule1</module> <module>MavenModule2</module> </modules> <properties> </properties> <profiles> <profile> <id>p1</id> <modules> <module>MavenModule1</module> </modules> </profile> <profile> <id>p2</id> <modules> <module>MavenModule2</module> </modules> </profile> </profiles> I would like to be able to build subsystem separately, e.g. mvn package -P p1 and mvn package -P p2 Both profiles are visible but can't be activated with -P switch mvn help:all-profiles -P p1 That work with other