ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <h...@visi.com>
Subject Re: fileset with multiple source directories?
Date Mon, 12 May 2003 19:36:54 GMT

At 01:45 PM 5/12/2003 -0500, you wrote:
>using a  pathconvert to flatten ur different filesets and then concatenate the
>different resulting properties to get one colom separated list ?
>seb.

Hmm... I'm a bit confused.  I'm already starting out with a colon separated 
list which is what your solution seems to provide as an end result.  Also, 
I don't have pre-existing filesets.  I am trying to create a fileset that 
contains all the files in the various source directories.  Or did you mean 
create individual filesets and then create one fileset that contains all 
those filesets?  That may be possible and it is something I 
considered.  However, the issue is, can I do this with Ant without the help 
of something like <foreach> from the ant-contrib package?

Jake


>Jacob Kjome wrote:
>
> > I have a property that contains a colon separated list of base directories
> > for sending to javac so that it will compile from multiple source
> > directories.  Now I need to copy any properties or xml files from each and
> > every one of those source directories to the build directory. However,
> > Filesets can only point to a single source directory the the copy fails
> > with the source directory given to the Fileset is this colon separated list
> > of source directories.  Is there any way to do what I need without
> > resorting to ant-contrib <foreach> and things like that?
> >
> > So, I have....
> >
> > in build.properties...
> >
> > contrib.path=contrib
> > src.contrib.projects=${contrib.path}/rollbackWithMementoPattern \
> >                       :${contrib.path}/jxpath \
> >                       :${contrib.path}/socketServer/client \
> >                       :${contrib.path}/socketServer/common \
> >                       :${contrib.path}/socketServer/example \
> >                       :${contrib.path}/socketServer/server \
> >                       :${contrib.path}/btree
> >
> > in build.xml...
> >
> > <target name="compile.contrib" depends="download.contrib.dependencies,
> > compile.core"
> >          description="Compile contrib sources" >
> >      <antcall target="-compile.sub">
> >          <param name="srcdir" value="${src.contrib.projects}" />
> >          <param name="includes" value="**/*.java" />
> >          <param name="excludes" value="**/old**/**" />
> >      </antcall>
> > </target>
> >
> > <target name="-compile.sub" if="srcdir" >
> >      <javac
> >          srcdir="${srcdir}"
> >          destdir="${build.home}"
> >          includes="${includes}"
> >          excludes="${excludes}"
> >          debug="${build.debug}"
> >          deprecation="${build.deprecation}"
> >          optimize="${build.optimize}"
> >          verbose="${build.verbose}">
> >          <classpath refid="build.classpath" />
> >      </javac>
> >
> >      <!-- Copy application resources -->
> >      <copy todir="${build.home}" >
> >          <fileset
> >              dir="${srcdir}"
> >              excludes="${excludes}"
> >              includes="**/*.properties,
> >                        **/*.ini,
> >                        **/*.character-sets,
> >                        **/*.dtd,
> >                        **/*.xsd,
> >                        **/*.*ml" />
> >      </copy>
> > </target>
> >
> > Obviously the <copy task will fail because the fileset gets a ${srcdir}
> > property containing a colon separated list of source directories.  Can
> > someone think of a nifty way of using <pathconvert> or something like that
> > to do what I need here?  Is there another approach that will work?  Again,
> > if it involves ant-contrib stuff, I can figure out how to do that just
> > fine.  I'm just looking for a pure ant solution.  I want to know whether it
> > is possible or not before I give up on Ant proper here.
> >
> > thanks,
> >
> > Jake
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message