I was not very happy with the approach taken, so I simplified it a bit.
Basically, the default property is set in the normal properties block and is redefined if necessary (instead of the effective switch statement):
<properties> <buildNumber>0</buildNumber> </properties> <profiles> <profile> <id>ci</id> <activation> <property> <name>env.buildNumber</name> </property> </activation> <properties> <buildNumber>${env.buildNumber}</buildNumber> </properties> </profile> </profiles>
source share