replace

<target name="init">
 <property name="src.dir" value="d:\src"/>
</target>

with just

<property name="src.dir" value="d:\src"/>

BTW, everything outside a target is evaluated before any targets.

Conor


> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 29 August 2001 3:34 PM
> To: [EMAIL PROTECTED]
> Subject: Fileset initialization problem
>
>
> I need few filesets to be referenced at a later point. The
> following is the
> skeleton of my build.xml file.
>
> <project name="...." default="init">
>
> <target name="init">
> <property name="src.dir" value="d:\src"/>
> </target>
>
> <fileset dir="${src.dir} id="fileset.1">
>      <include name="**/.class"/>
> </fileset>
>
> <target name="create.ejbjar" depends="init">
>      <ejbjar ...>
>           .
>           <support refid="fileset.1"/>
>           .
>           .
>      </ejbjar>
> </target>
> </project>
>
> When I execute, the build file fails saying that directory ${src.dir} does
> not exist. It looks like ant is doing some fileset initiliazation
> before it
> calls the default target. It works perfectly, if I hardcode the fileset
> dir, instead of giving a property reference. Is there a
> workaround for this
> problem?
>
>  I am writing a generic ejbjar target which can be passed the required
> paramters (descriptordir, support files etc), so that I can use to create
> any EJB I need. Since the support element of ejbjar task needs a
> fileset, I
> need a way of passing a fileset to the generic EJB target. Is there any
> other way of doing this without passing filesets.
>
> Thanks,
> Siva Prasad
>
>

Reply via email to