ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <DDevie...@lgc.com>
Subject RE: Mappers and Closure can't be nullable
Date Tue, 03 May 2005 17:52:57 GMT
> From: Casey Daniell [mailto:CDaniell@realm.com]
> 
>   <fileset id="lib-files" dir="${libs.dir}">
>     <include name="gateway-2.3.6.jar"/>
>   </fileset>
> 
>     <copy todir="${deploy.dest}/lib">
>       <fileset refid="lib-files"/>
>       <mapper type="regexp"
>               from="^(\w+(\-*\w*)*)(\-+([0-9]?.?)*)*(.jar)$$"
>               to="\1\5"/>
>     </copy>

Your regexp looks a bit too complex. Assuming the version number is
always after the - and before the .jar, and composed of any number of
digits separated with dots, I'd go with (untested):

from="^(\w+)-[\d\.]*\.jar$" to="\1.jar"

--DD

PS: I don't think the trailing $$ is necessary, but I could be wrong.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message