通过 -P或者-D来指定,
<profile> <id>test-1</id> <activation> <property> <name>test-2</name> <value>true</value> </property> </activation> </profile>
如图:可以通过 指定
mvn -Ptest-1 install
或者
mvn -Dtest-2=true install