Maven plugin to support some kind of conditional compilation in Java Maven projects
Please see this blog post on how this works and how it can be used in a project.
The plugin is available on maven central to be included in your project's pom file:
<dependency>
<groupId>de.renebergelt.maven.plugins</groupId>
<artifactId>compile-switches-maven-plugin</artifactId>
<version>1.0.0</version>
<type>maven-plugin</type>
</dependency>