The slightly longer answer...
The problem is that at a high-level every <antcall>
invokes an new private "ANT" environment. Any
properties that are defined inside that new private
"ANT" enviroment are not copied back out to the
orignating "ANT" enviroment.
Your property ${admin} is loaded inside a private
"ANT" enviroment and so its visible/lifetime is
limited to that enviroment.
By using a depends= attribute (or a <macrodef>
technique) on starting target you retain the original
ANT enviroment through all the ANT targets and so all
properties definitions are retained.
Hope that helps
--- [EMAIL PROTECTED] wrote:
>
> I am trying to use antcall, I had a property file
> called admin.size in
> which value admin=136374, I can't put this property
> file admin.size
> ouside of create-zip target.
>
> <target name="create-zip" description="Generates the
> zip files">
>
> <property file="admin.size"/>
> <move file="Admin.zip"
>
tofile="${common.name}${today.date}${admin.name}${admin}.zip"/>
> <mkdir
>
dir="${today.date}/${common.name}${today.date}${admin.name}${admin}"/>
>
> </target>
> <target name="splitte-zip">
> <antcall target="create-zip"/>
> <java classname="Helper" fork="yes"
> failonerror="true">
> <arg value="-break[10240]"/>
> <arg
>
value="${common.name}${today.date}${admin.name}${admin}.zip"/>
> <arg
>
value="${today.date}/${common.name}${today.date}${admin.name}${admin}"/>
> </java>
> </target>
>
>
> gives error:
> [java] Error opening input file:
> java.io.FileNotFoundException:
> OCC_20051020_PAdmin_${admin}.zip (The system cannot
> find the file
> specified)
>
> can anyone guess what I am doing wrong, and how I
> should use antcall,
>
> Pritesh
>
>
>
> Confidentiality Notice
>
> The information contained in this electronic message
> and any attachments to this message are intended
> for the exclusive use of the addressee(s) and may
> contain confidential or privileged information. If
> you are not the intended recipient, please notify
> the sender at Wipro or [EMAIL PROTECTED]
> immediately
> and destroy all copies of this message and any
> attachments.
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]