Code Monkey home page Code Monkey logo

ecosystem-maven-regex-profile-activation-extension's Introduction

Regex Profile Activation Extension

This maven extension allows activating profiles by checking that a property matches a given regex, rather than an exact value.

Example Usage

You can register this extension with your maven build by specifying it in your ${project.baseir}/.mvn/extensions.xml file like so:

<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 http://maven.apache.org/xsd/core-extensions-1.0.0.xsd">

    <extension>
        <groupId>fish.payara.maven.extensions</groupId>
        <artifactId>regex-profile-activator</artifactId>
        <version>0.2</version>
    </extension>

</extensions>

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

<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 matching the regex.

Details

This extension will find properties first by checking for properties specified on the command line with -D, followed by other maven system properties or environment variables. If none of these are found, the property will be read from discovered pom files in the project hierarchy, checking each parent pom recursively until no more are found.

Releasing

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

ecosystem-maven-regex-profile-activation-extension's People

Contributors

mattgill98 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.