I’m using the profile for determining as
<profiles>
<profile>
<activation>
<activeByDefault>true</activeByDefault>
<property>
<name>!myproperty</name>
</property>
</activation>
...
<properties>
<myproperty>some value</myproperty>
</properties>
</profile>
...
</profiles>
Please note
- The
activeByDefault
is set to true with purpose to enable it by default. - The
!myproperty
means this property is missing or not existed. - If the
myproperty
is not existed, just use themyproperty
defined at theproperties
instead.
You may see further information at http://maven.apache.org/guides/introduction/introduction-to-profiles.html
I hope this may help to achieve your requirement.
Regards,
Charlee Ch.