>>> On Thu, Apr 20, 2006 at 4:20 pm, in message
<4447FB08.9020705@gmx.de>, Antoine
Levy-Lambert <antoine@gmx.de> wrote:
> Hello Andrew,
>
> I think that ant- contrib ( a related project which can be used as
an
> extension of ant) has good tasks for that.
>
> Regards,
>
> Antoine
>
Thanks - I found the PropertyRegex task in ant-contrib.
Andy
> Andrew Goodnough wrote:
>> I've got a property with the value
>> "http://subversion/svn/ccap/BBE/branches/02_4X/BBEApp". This
>> property will change based on context. I want to create a new
property
>> >from this other property that contains the value "02_4X". I'm
looking
>> for a feature in the <property> task that can accept a <mapper>
(like
>> the <propertyset> task) but works on a single property. I'm
thinking it
>> would look something like the code below. Is there anything which
>> currently would do this?
>>
>> <!-- Setup first property -- >
>> <property name="svn.info.url"
>> value="http://subversion/svn/ccap/BBE/branches/02_4X/BBEApp"/>
>>
>> <!-- Assign second from the first using a mapper -- >
>> <property name="svn.branch">
>> <property name="svn.info.url">
>> <!-- This regex is probably
bad,
>> but you get the point -- >
>> <mapper type="regex" type="regexp"
>> from="^(.*)/([^branches]+)/([^/]*)$$" to="\2"/>
>> </property>
>> </property>
>>
>> <!-- Echo the result -- >
>> <echo message="Branch=${svn.branch}"/>
>>
>> Desired Result:
>>
>>
>>> Branch=02_4X
>>>
>>
>>
>> Andy
>>
>>
>>
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e- mail: user- unsubscribe@ant.apache.org
> For additional commands, e- mail: user- help@ant.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
|