I have two profiles for different environments in pom.xml, I have to run mvn -PTest1 install and mvn -PTest2 install command to get th
pom.xml
mvn -PTest1 install
mvn -PTest2 install
Based on the maven help command
-P,--activate-profiles Comma-delimited list of profiles to activate
So you can run mvn package -Pp1,p2 to run profile id with p1 and p2
mvn package -Pp1,p2