Maven Regex Profile Activation Extension

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

Usage

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

<dependency>
    <groupId>fish.payara.maven.extensions</groupId>
    <artifactId>regex-profile-activator</artifactId>
    <version>${version}</version>
</dependency>

You can find the latest artifact version from here.

Example

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
<profile>
    <id>test-profile</id>
    <activation>
        <property>
            <name>myproperty</name>
            <value>/abra.+/</value>
        </property>
    </activation>
</profile>

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

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

mvn install -Dsign