Ant pathconvert does not accept line feeds

All I need to do is create a file containing a list of file names (separated by "\ r \ n" or "\ n" depending on the OS) in a specific folder. For some reason, the code below does not work:

    <fileset id="my_files" dir="./resource">
        <include name="*.js" />
    </fileset>
    <pathconvert property="my_files_list" refid="my_files" pathsep="\r\n" />

    <echo message="${my_files_list}" file="my_files_list.txt"/>

I get a list of files separated by a string that literally contains four characters "\ r \ n". Firstly, I would like them to convert to a real (white space) new line, and secondly, I would like them to have an OS-specific separator.

I ask for advice

+5
source share
1 answer

Ant line.separator, \r\n. , , , Ant, , , .

, :

<pathconvert property="my_files_list" refid="my_files" pathsep="${line.separator}" />
+7

All Articles