Hi,
I'm trying to generate a timestamp that is recalculated during the execution
of the same build, but it seems that the behavior is different when the
<webtest> command is added.
So, for example this:
<project name="test" default="test">
<property file="test.properties"/>
<import file="${webtest.home}/webtest.xml"/>
<import file="general.xml"/>
<target name="test" depends="wt.defineTasks">
<taskdef resource="net/sf/antcontrib/antlib.xml"/>
<var name="test" value="" unset="true"/>
<tstamp>
<format property="test"
pattern="d-MMMM-yyyy"/>
</tstamp>
<echo>${test}</echo>
<var name="test" value="" unset="true"/>
<tstamp>
<format property="test"
pattern="d-MMMM-yyyy" offset="5" unit="day"/>
</tstamp>
<echo>${test}</echo>
</target>
</project>
Produces the following expected output:
17-april-2009
22-april-2009
Adding the <webtest> command:
<project name="test" default="test">
<property file="test.properties"/>
<import file="${webtest.home}/webtest.xml"/>
<import file="general.xml"/>
<target name="test" depends="wt.defineTasks">
<taskdef resource="net/sf/antcontrib/antlib.xml"/>
<webtest name="blabla">
<var name="test" value="" unset="true"/>
<tstamp>
<format property="test"
pattern="d-MMMM-yyyy"/>
</tstamp>
<echo>${test}</echo>
<var name="test" value="" unset="true"/>
<tstamp>
<format property="test"
pattern="d-MMMM-yyyy" offset="5" unit="day"/>
</tstamp>
<echo>${test}</echo>
</webtest>
</target>
</project>
Produces the following output:
17-april-2009
17-april-2009
I know a workaround is to use ant properties with a different name, but for
making my scripts more generic, I would like to do it in the way above.
Can anyone help on this?
Thanks!
David