I'm having some challenges while trying to develop JS applications with Ant.
I have a directory named
src
and each subdirectory inside it is considered a "mini-app". When I iterate through each subdirectory usingsubant
, I'm struggling to get the name of the subdirectory relative to src (without the full path). I tried using
, but it displays the complete path like<property name="app" location="." />
C:\etc\etc\src\miniapp
instead of justminiapp
There is an
<apply>
task that runs on all JavaScript template files. A rhino script pre-compiles template strings into template functions. I'm usingoutputproperty
to captureprint(...)
, but the property only holds the output of the last template file when I try to use it after the apply task completes. This is the entire task:<target name="compile-jst"> <apply dir="build" executable="java" outputproperty="templates"> <fileset dir="src" includes="**/*.jst" /> <arg line="-jar rhino.jar compile-jst.js" /> <srcfile /> </apply> </target>
Thank you.
Update resolved the first issue:
<basename file="${basedir}" property="app" />
Still struggling with concatenating <apply>
output.