R
RJGraham
Hello,
I have a few properties defined in my ant build file, but substitutions are
not occurring on all tasks.
For example, in the snippet below, my jar file gets named correctly with the
build number property value added to my jar file name, e.g. 'camlet1.jar'
for build.number = 1.
The mkdir task also creates the proper directory (ie., 'dist' directory is
created).
But, the copy task creates a directory named '$deploy' instead of 'dist' as
expected.
The two replace tasks also insert '$(build.nember)' instead of the build
number value.
What am I doing wrong?
I assume property substitutions should work with copy and replace.
Thanks for any help.
-Randy
<property name="build" location="build/"/>
<property name="dist" location="dist/"/>
<property name="deploy" location="dist/"/>
<target name="dist" depends="compile"
description="generate the distribution" >
<!-- Create the distribution directory -->
<mkdir dir="${dist}"/>
<jar jarfile="${dist}/camlet${build.number}.jar" basedir="${build}"
manifest="deployed/MANIFEST.MF"/>
<copy todir="$(deploy)/">
<fileset dir="deployed">
<exclude name="MANIFEST.MF"/>
</fileset>
</copy>
<replace file="$(deploy)/camlet.html" token="camlet.jad"
value="camlet$(build.number).jad"/>
<replace file="$(deploy)/camlet.jad" token="camlet.jar"
value="camlet$(build.number).jar"/>
</target>
I have a few properties defined in my ant build file, but substitutions are
not occurring on all tasks.
For example, in the snippet below, my jar file gets named correctly with the
build number property value added to my jar file name, e.g. 'camlet1.jar'
for build.number = 1.
The mkdir task also creates the proper directory (ie., 'dist' directory is
created).
But, the copy task creates a directory named '$deploy' instead of 'dist' as
expected.
The two replace tasks also insert '$(build.nember)' instead of the build
number value.
What am I doing wrong?
I assume property substitutions should work with copy and replace.
Thanks for any help.
-Randy
<property name="build" location="build/"/>
<property name="dist" location="dist/"/>
<property name="deploy" location="dist/"/>
<target name="dist" depends="compile"
description="generate the distribution" >
<!-- Create the distribution directory -->
<mkdir dir="${dist}"/>
<jar jarfile="${dist}/camlet${build.number}.jar" basedir="${build}"
manifest="deployed/MANIFEST.MF"/>
<copy todir="$(deploy)/">
<fileset dir="deployed">
<exclude name="MANIFEST.MF"/>
</fileset>
</copy>
<replace file="$(deploy)/camlet.html" token="camlet.jad"
value="camlet$(build.number).jad"/>
<replace file="$(deploy)/camlet.jad" token="camlet.jar"
value="camlet$(build.number).jar"/>
</target>