Does Apache Ant provide the ability to set a specific value in a text file in a specific place?

UPD: I need to edit the values ​​of variables in the JS-file, and depending on the final specific folder.

For example, there is a file build.js. We add it to different folders and, depending on the specific, set a specific value in the variable.

    1 answer 1

    Yes, it is quite. Here is an example of a regular build.xml file for building Ant project:

    <?xml version="1.0" encoding="ISO-8859-1"?> <project name="myproject" default="make.production"> <!--Тут создаются свойства для указания путей--> <dirname property="project.dir" file="${ant.file}"/> <property name="project.name" value="myproject"/> <property name="project.output.dir" location="${project.dir}/classes/production/${project.name}"/> <!--Тут они используются--> <target name="make.javacode.compile" description="compile module"> <delete dir="${project.output.dir}"/> ... </target> </project> 

    Thus, you sort of declare variables pointing to paths in the first part of the file (where properties are created to specify paths), and the value of these variables can be set to a specific value and edited, and the contents of the file will not need to be further changed.

    • I need to edit the value of the variables in the JS-file, and depending on the final folder. That was the question. - Timur Musharapov