Documentation on the regex-property goal of build-helper-maven-plugin at http://www.mojohaus.org/build-helper-maven-plugin/usage.html has an error. This error has persisted for some time and has proliferated around the Internet, for example in several Stack Overflow posts.

The error is this:

In the section marked "Set a property by applying a regex replacement to a value",
under <configuration>, we see the <value> element exampled as

<value>$\{project.version}</value>

This is incorrect. The goal will fail if the backslash is included and succeed if it is omitted. From my basic understanding of regex and of Maven, it seemed wrong and I have verified that it is.

It's probably a typo, one that has confused some people, for example, on Stack Overflow:

http://stackoverflow.com/questions/17516313/possible-bug-when-parsing-properties-with-goal-regex-property-of-build-helper

Can someone fix it?

Steve Cohen

Reply via email to