regex-property
goal doesn't interpret <replacement>
correctly, corrupting output
#155
Labels
regex-property
goal doesn't interpret <replacement>
correctly, corrupting output
#155
I'm using
org.codehaus.mojo:build-helper-maven-plugin:3.3.0
on Windows.Let's say I want to use the
regex-property
goal to replace some value with the build directory path:I'm on Windows, and my
${project.build.directory}
happens to be something likeC:\projects\foobar\target
.Expected
bar
:C:\projects\foobar\target
Actual
bar
:C:projectsfoobartargetC:projectsfoobartarget
Not only has Build Helper Plugin removed all the backslashes, it has strangely duplicated the output!
I can only make a wild guess why this is happening. Perhaps the plugin is recursively evaluating the result until there are no unevaluated expressions. But the
<replacement>
should not be evaluated as a regular expression; it should be evaluated as a normal Maven interpolation string (i.e. substituting any{$variable}
). I don't believe backslashes have any significance in normal interpolations strings, do they?Why the output is being duplicated I have no idea.
The text was updated successfully, but these errors were encountered: