-
Notifications
You must be signed in to change notification settings - Fork 0
Usage
Abid Ali edited this page Oct 20, 2017
·
3 revisions
After adding plugin in your pom e.g
<plugins>
...
<plugin>
<groupId>com.github.aaabidunique</groupId>
<artifactId>dynamic-property-maven-plugin</artifactId>
<version>1.0.1</version>
<executions>
<execution>
...
</execution>
</executions>
</plugin>
...
</plugins>
- write your custom execution in execution tag e.g
<executions>
<execution>
<id>process-dynamic-properties</id>
<phase>validate</phase>
<goals>
<goal>process-dynamic-properties</goal>
</goals>
<configuration>
...
</configuration>
</execution>
</executions>
Note: There is only one goal supported by plugin at this moment i.e process-dynamic-properties. The phase should be validate phase since dynamic properties injection should happen before actual build starts.
- write your custom configuration in configuration tag e.g
<configuration>
<operations>
<operation>
<criteria>
<inputProperty>${project.version}</inputProperty>
<operator>REGEX</operator>
<operand>.*-SNAPSHOT</operand>
</criteria>
<trueOperations>
<operationProperty>
<key>your_key</key>
<value>your_value</value>
</operationProperty>
...
</trueOperations>
<falseOperations>
<operationProperty>
<key>your_key</key>
<value>your_value</value>
</operationProperty>
...
</falseOperations>
</operation>
...
</operations>
</configuration>
Note: This plugin supports multiple operation. Each operation supports multiple true and false operation.
Currently supported operator are:
- EQUALS
- EQUALS_IGNORE_CASE
- CONTAINS
- REGEX