Maven Regex Profile Activation Extension

Maven Regex Profile Activation allows activating profiles by checking that a property matches a given Regex, rather than an exact value.


The Regex Profile Activator Maven Extension can be found on Maven Central, and can be included in your project using the following Maven coordinates:


You can find the latest artifact version from here.


This extension is now active in your build, and you can activate profiles using a regex string beginning and ending with a /.

Example usage of Maven Regex Profile Activation in a pom.xml file

The profile above will be active when built with -Dmyproperty=abracadabra, or anything else is matching the regex.

In order to release, you will need to sign the source, javadoc and artifact JARs. To do this, build the project with the sign profile:

mvn install -Dsign