My question is similar to this: How to exclude a module from a Maven reactor build?; however what I'd like to do is define a way of turning off-on modules based on a property. This property will be defined in an external property file we're using as our build profile.
The problem is that the property file isn't read in until the lifecycle after the Reactor is run (it appears Reactor is always run first).
Something like:
propertyfile.properties
module1.enabled = true
module2.enabled = false
module3.enabled = true
pom.xml
<profiles>
<profile>
<id>module1</id>
<activation>
<activeByDefault>false</activeByDefault>
<property>
<name>module</name>
<value>true</value>
</property>
</activation>
</profile>
...
</profiles>