Loading src/main/java/com/inteligr8/maven/model/Regex.java +1 −4 Original line number Diff line number Diff line Loading @@ -14,8 +14,6 @@ */ package com.inteligr8.maven.model; import org.apache.commons.lang3.StringUtils; public class Regex implements Normalizable { private String pattern; Loading @@ -41,8 +39,7 @@ public class Regex implements Normalizable { @Override public void normalize() { this.pattern = StringUtils.trimToNull(this.pattern); this.replacement = StringUtils.trimToNull(this.replacement); // do not trim } } src/main/java/com/inteligr8/maven/regex/MatchFileContentMojo.java +13 −2 Original line number Diff line number Diff line Loading @@ -89,10 +89,23 @@ public class MatchFileContentMojo extends AbstractMatchMojo { return path; } @Override protected void validateParamsPreNormalization() throws MojoFailureException { super.validateParamsPreNormalization(); if (this.filesets == null || this.filesets.isEmpty()) throw new MojoFailureException("At least one 'fileset' is required"); } @Override protected void normalizeParameters() throws MojoFailureException { super.normalizeParameters(); for (FileSet fileset : this.filesets) { if (fileset.getDirectory() == null) fileset.setDirectory(this.project.getBasedir().getAbsolutePath()); } this.newProperty = StringUtils.trimToNull(this.newProperty); } Loading @@ -100,8 +113,6 @@ public class MatchFileContentMojo extends AbstractMatchMojo { protected void validateParamsPostNormalization() throws MojoFailureException { super.validateParamsPostNormalization(); if (this.filesets == null || this.filesets.isEmpty()) throw new MojoFailureException("At least one 'fileset' is required"); if (this.newProperty == null) throw new MojoFailureException("The 'newProperty' element is required"); } Loading src/main/java/com/inteligr8/maven/regex/ReplaceFileContentMojo.java +1 −1 Original line number Diff line number Diff line Loading @@ -111,7 +111,7 @@ public class ReplaceFileContentMojo extends AbstractReplaceMojo { if (fileset.getDirectory() == null) fileset.setDirectory(this.project.getBasedir().getAbsolutePath()); if (fileset.getOutputDirectory() == null) fileset.setOutputDirectory(this.project.getBasedir().getAbsolutePath()); fileset.setOutputDirectory(fileset.getDirectory()); } } Loading Loading
src/main/java/com/inteligr8/maven/model/Regex.java +1 −4 Original line number Diff line number Diff line Loading @@ -14,8 +14,6 @@ */ package com.inteligr8.maven.model; import org.apache.commons.lang3.StringUtils; public class Regex implements Normalizable { private String pattern; Loading @@ -41,8 +39,7 @@ public class Regex implements Normalizable { @Override public void normalize() { this.pattern = StringUtils.trimToNull(this.pattern); this.replacement = StringUtils.trimToNull(this.replacement); // do not trim } }
src/main/java/com/inteligr8/maven/regex/MatchFileContentMojo.java +13 −2 Original line number Diff line number Diff line Loading @@ -89,10 +89,23 @@ public class MatchFileContentMojo extends AbstractMatchMojo { return path; } @Override protected void validateParamsPreNormalization() throws MojoFailureException { super.validateParamsPreNormalization(); if (this.filesets == null || this.filesets.isEmpty()) throw new MojoFailureException("At least one 'fileset' is required"); } @Override protected void normalizeParameters() throws MojoFailureException { super.normalizeParameters(); for (FileSet fileset : this.filesets) { if (fileset.getDirectory() == null) fileset.setDirectory(this.project.getBasedir().getAbsolutePath()); } this.newProperty = StringUtils.trimToNull(this.newProperty); } Loading @@ -100,8 +113,6 @@ public class MatchFileContentMojo extends AbstractMatchMojo { protected void validateParamsPostNormalization() throws MojoFailureException { super.validateParamsPostNormalization(); if (this.filesets == null || this.filesets.isEmpty()) throw new MojoFailureException("At least one 'fileset' is required"); if (this.newProperty == null) throw new MojoFailureException("The 'newProperty' element is required"); } Loading
src/main/java/com/inteligr8/maven/regex/ReplaceFileContentMojo.java +1 −1 Original line number Diff line number Diff line Loading @@ -111,7 +111,7 @@ public class ReplaceFileContentMojo extends AbstractReplaceMojo { if (fileset.getDirectory() == null) fileset.setDirectory(this.project.getBasedir().getAbsolutePath()); if (fileset.getOutputDirectory() == null) fileset.setOutputDirectory(this.project.getBasedir().getAbsolutePath()); fileset.setOutputDirectory(fileset.getDirectory()); } } Loading