You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Fabien PERIE <fa...@gmail.com> on 2013/03/19 10:00:10 UTC

build helper maven plugin:regex-property :: set the maven property with the value if the regex don't match ?

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

Re: build helper maven plugin:regex-property :: set the maven property with the value if the regex don't match ?

Posted by Fabien PERIE <fa...@gmail.com>.
Sorry but I smoked this morning...
I come to add a new IT test to validate the proper functioning of the
plugin...

Fabien

2013/3/19 Fabien PERIE <fa...@gmail.com>

> Hello,
>
> I created a jira issue available here :
> https://jira.codehaus.org/browse/MBUILDHELPER-54
>
>
> Thank's a lot,
> Fabien
>
> 2013/3/19 Fabien PERIE <fa...@gmail.com>
>
>> 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
>>
>
>

Re: build helper maven plugin:regex-property :: set the maven property with the value if the regex don't match ?

Posted by Fabien PERIE <fa...@gmail.com>.
Hello,

I created a jira issue available here :
https://jira.codehaus.org/browse/MBUILDHELPER-54

Thank's a lot,
Fabien

2013/3/19 Fabien PERIE <fa...@gmail.com>

> 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
>