maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fabien PERIE <fabien.pe...@gmail.com>
Subject build helper maven plugin:regex-property :: set the maven property with the value if the regex don't match ?
Date Tue, 19 Mar 2013 09:00:10 GMT
Hello,

I use the build helper maven plugin:regex-property maven plugin to define a
maven property with a prefix (the character -) from the
parsedVersion.qualifier maven property.
If the parsedVersion.qualifier maven property is not defined, my variable
must be set to empty.

After resolving this issue : "regex-property goal should allow an empty
replacement <https://jira.codehaus.org/browse/MBUILDHELPER-53>", I have
tried to write :
*
<configuration>
*
*<name>MparsedVersion.qualifier</name>
<value>-${parsedVersion.qualifier}</value>
<regex>-$</regex>
<replacement></replacement>
<failIfNoMatch>false</failIfNoMatch>
*
*</configuration>
*

This plugin allows to replace an expression in a value to set an another
maven property.
Insofar as it tells the plugin does not fail if the regex don't match, we
should set the value of the new maven property with the initial value, no ?

What do you think ?

Thank's a lot,
Fabien

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message