ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas Vervelle <nicolas.verve...@steria.com>
Subject Re: AW: Convert a path
Date Wed, 04 May 2005 05:57:26 GMT
Hi,

I finallay manage to do it (and my initial question also) with a bunch 
of <replaceregexp>, <propertyregex>.
If someone is interested, the resulting build file is available at :
http://cvs.sourceforge.net/viewcvs.py/jmol/Jmol-web/build-deploy.xml?rev=1.7&view=markup

This way I can put the property file used by <modified> under cvs and 
share it with other developers even with different base directories and 
operating system.
Well, I have only tested it under Windows, not yet Linux and Mac OS, but 
I think it will work or require little modifications.

Thanks for the help.
Nicolas

Jan.Materne@rzf.fin-nrw.de wrote:

><modified> uses the File.getAbsolutePath() method. That should have the
>platform
>dependend separators and roots (/, A: B: ...). So you could try a
><replaceregexp/>.
>
>
>Jan
>
>  
>
>>-----Urspr√ľngliche Nachricht-----
>>Von: Alexey N. Solofnenko [mailto:A.Solofnenko@mdl.com]
>>Gesendet am: Dienstag, 3. Mai 2005 19:49
>>An: Ant Users List
>>Betreff: Re: Convert a path
>>
>>I would use <scriptdef> with your preferred scripting language. There 
>>are several scripting languages written in Java (Jython, Groovy, 
>>BeanShell,...) and they are as portable as Java itself.
>>
>>- Alexey.
>>
>>Nicolas Vervelle wrote:
>>
>>    
>>
>>>I didn't have much success with my last question :(
>>>I will try with only a small problem then :
>>>
>>>How to expand a path (${build.dir}) to match what I get with 
>>>      
>>>
>><modified> 
>>    
>>
>>>and the reverse modification?
>>>For example : E:\Java\Jmol-web -> E\:\\Java\\Jmol-web -> 
>>>      
>>>
>>E:\Java\Jmol-
>>    
>>
>>>web
>>>
>>>It must be portable (Windows, Linux, Mac OS, ...)
>>>I could probably do it with regular expressions,
>>>but then I will have to check every "escapable" character
>>>They are probably not limited to ':' and '\'
>>>
>>>TIA,
>>>Nicolas
>>>
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>>>For additional commands, e-mail: user-help@ant.apache.org
>>> 
>>>
>>>      
>>>
>>-- 
>>--------------------------------------------------------------
>>----------
>>/ Alexey N. Solofnenko
>>home: http://trelony.cjb.net/
>>/
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>>For additional commands, e-mail: user-help@ant.apache.org
>>
>>    
>>
>
>  
>


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