Skip to content

Commit 9d93796

Browse files
author
TheSnoozer
committed
#317: add the new transformation rule engine to the demo-profile that is being executed; note Maven is not required to use the constructer to create a Transformation rule and thus we need to set the applyRule and actionRule
1 parent 6557ed6 commit 9d93796

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ It's really simple to setup this plugin; below is a sample pom that you may base
371371
<!-- example: apply replacement only to the specific property git.branch and replace '/' with '-'
372372
<replacementProperty>
373373
<property>git.branch</property>
374-
<propertyOutputSuffix>something<propertyOutputSuffix>
374+
<propertyOutputSuffix>something</propertyOutputSuffix>
375375
<token>^([^\/]*)\/([^\/]*)$</token>
376376
<value>$1-$2</value>
377377
<regex>true</regex>

pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,8 +386,15 @@
386386
<replacementProperties>
387387
<replacementProperty>
388388
<property>git.branch</property>
389+
<propertyOutputSuffix>something</propertyOutputSuffix>
389390
<token>^([^\/]*)\/([^\/]*)$</token>
390391
<value>$1-$2</value>
392+
<transformationRules>
393+
<transformationRule>
394+
<apply>BEFORE</apply>
395+
<action>UPPER_CASE</action>
396+
</transformationRule>
397+
</transformationRules>
391398
</replacementProperty>
392399
</replacementProperties>
393400
<failOnNoGitDirectory>false</failOnNoGitDirectory>

src/main/java/pl/project13/maven/git/TransformationRule.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ public String getApply() {
8989
}
9090

9191
public void setApply(String apply) {
92+
this.applyRule = ApplyEnum.valueOf(apply);
9293
this.apply = apply;
9394
}
9495

@@ -101,6 +102,7 @@ public String getAction() {
101102
}
102103

103104
public void setAction(String action) {
105+
this.actionRule = ActionEnum.valueOf(action);
104106
this.action = action;
105107
}
106108

0 commit comments

Comments
 (0)