File tree Expand file tree Collapse file tree 3 files changed +16
-1
lines changed
src/main/java/pl/project13/maven/git Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Original file line number Diff line number Diff 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>
Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change @@ -89,10 +89,14 @@ public String getApply() {
8989 }
9090
9191 public void setApply (String apply ) {
92+ this .applyRule = ApplyEnum .valueOf (apply );
9293 this .apply = apply ;
9394 }
9495
9596 public ApplyEnum getApplyRule () {
97+ if (applyRule == null ) {
98+ throw new IllegalStateException ("The parameter 'apply' for TransformationRule is missing or invalid" );
99+ }
96100 return applyRule ;
97101 }
98102
@@ -101,10 +105,14 @@ public String getAction() {
101105 }
102106
103107 public void setAction (String action ) {
108+ this .actionRule = ActionEnum .valueOf (action );
104109 this .action = action ;
105110 }
106111
107112 public ActionEnum getActionRule () {
113+ if (actionRule == null ) {
114+ throw new IllegalStateException ("The parameter 'action' for TransformationRule is missing or invalid" );
115+ }
108116 return actionRule ;
109117 }
110118}
You can’t perform that action at this time.
0 commit comments