You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Steve Cohen <St...@ignitesports.com> on 2002/08/13 03:11:12 UTC
Too wierd - Property "forgetting"
Heck of a thing to find first day back from vacation:
A colleague and I are both running the same version of ant, version 1.5Beta3.
We are running ant over the same scripts.
Script A makes an <ant> call to script B.
Script A calls the following target: (located in script B):
<target name="sportsbean">
<antcall target="checkout">
<param name="projectroot" value="${root}/sportsbean"/>
<param name="ST.proj" value = "SportsBean" />
<param name="ST.view" value = "${sportsbean.vers}" />
<param name="ST.folder" value = "/sportsbean" />
<param name="ST.label" value = "${sportsbean.lbl}" />
</antcall>
...
</target>
Previously defined in script B are these properties:
<property name="sportsbean.vers" value="Version 5.1"/>
<property name="sportsbean.lbl" value=""/>
The definition of the "checkout" target (located in script B) is as follows:
<target name="checkout">
<mkdir dir="${projectroot}"/>
<delete dir="${projectroot}"/>
<echo message="Checking out from:"/>
<echo message=" Project: ${ST.proj}"/>
<echo message=" View: ${ST.view}"/>
<echo message=" Folder: ${ST.folder}"/>
<echo message=" Label: ${ST.label}"/>
<stcheckout servername="${ST.server}"
serverport="${ST.port}"
projectname="${ST.proj}"
viewname="${ST.view}"
username="${ST.user}"
password="${ST.pswd}"
rootstarteamfolder="${ST.folder}"
rootlocalfolder="${projectroot}"
excludes="*.war"
forced="yes"
label="${ST.label}"
/>
</target>
Never mind the optional <stcheckout> task which is probably unfamiliar. The problem I am grappling with is far more troubling and puzzling because it is merely a question of property definition:
Notice the five echo calls.
In my colleague's run of this script, the following output is produced by these calls. This is the output I would expect.
Checking out from:
Project: SportsBean
View: Version 5.1
Folder: /sportsbean
Label:
In my run of the same script, this is the output of the same script, run with the same parameters.
Checking out from:
Project: SportsBean
View:
Folder: /sportsbean
Label:
The key difference is the blank content of the ${ST.view} parameter.
Again, to reiterate: there is no difference between the way my colleague is running this script and the way I am. Nothing in either script, the command line, or any property file defines the the ${sportsbean.vers} property (which feeds the ${ST.view} param) other than the single line in script B where it is defined.
I am completely at a loss to explain these results. It seems as though my run of the scripts is
causing the ${sportsbean.vers} property to be "forgotten" across the <antcall> in my case but not in my colleague's case.
Does anyone know of any bugs in ant version 1.5Beta3 that could account for these results, or can anyone think of something that I am overlooking, which could cause them?
-----------------------------------------------------------------
Steve Cohen
Sr. Software Engineer
Ignite Sports, Inc.
stevec@ignitesports.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>