ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sivaprasad.Kanche...@itsindia.com
Subject RE: Fileset initialization problem
Date Wed, 29 Aug 2001 06:04:39 GMT

> replace
>
> <target name="init">
>  <property name="src.dir" value="d:\src"/>
> </target>
It is actually ${build.dir}. Sorry about the confusion. I need to create
this directory in the init target. Now the problem is that the build fails
saying the directory does not exist. How do I create a directory before Ant
evaluates the fileset?
>
> with just
>
> <property name="src.dir" value="d:\src"/>


>
> BTW, everything outside a target is evaluated before any targets.
>
> Conor
>
>
> > -----Original Message-----
> > From: Sivaprasad.Kancherla@itsindia.com
> > [mailto:Sivaprasad.Kancherla@itsindia.com]
> > Sent: Wednesday, 29 August 2001 3:34 PM
> > To: ant-user@jakarta.apache.org
> > 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
> >
> >
>
>
>
>


Mime
View raw message