Save the Ant properties to a file
You can save the Ant properties to a file by calling the echo_all_properties or echo_outgen _properties Ant target.
- echo_all_properties: Saves all defined Java
properties to the following
file:
${outgen.job.dir}/ant-all[<time>].properties
- echo_outgen _properties: Saves to a file the
Java properties that correspond to the following pattern:
- hostname
- outgen.*
- env.*
The properties are saved to the following file:${outgen.job.dir}/<outputfile>.ant-outgen[<time>].properties
<target name="export">
<!-- Copy source files to output directory -->
<copy todir="${outputdir}">
<fileset dir="${temp}${file.separator}${path}">
<exclude name="out"/>
</fileset>
</copy>
<antcall target="echo_all_properties"/>
</target>
The following code shows an excerpt from a sample properties
file:
#Ant properties
#Tue Dec 16 09:40:48 EST 2014
DSTAMP=20141216
TODAY=December 16 2014
TSTAMP=0940
ant.core.lib=C\:\\ixiasoft\\OutputGenerators\\Prod\\libs\\ant\\ant.jar
ant.file=C\:\\ixiasoft\\OutputGenerators\\Prod\\data\\conductor-ot.xml
ant.file.commontargets=C\:\\ixiasoft\\OutputGenerators\\Prod\\data\\commontargets.xml
ant.file.commontargets-macros=C\:\\ixiasoft\\OutputGenerators\\Prod\\data\\commontargets-macros.xml
ant.file.commontargets-system=C\:\\ixiasoft\\OutputGenerators\\Prod\\data\\commontargets-system.xml
ant.file.conductor-ot=C\:\\ixiasoft\\OutputGenerators\\Prod\\data\\conductor-ot.xm
...
You
can call these targets more than once in the transformation scenario, since a new file
(with a timestamp) is created each time you call the target. This can be useful when
debugging your transformation scenario, for example, to determine when a specific
property is set.