ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher BROWN <>
Subject How should an Ant <fileset> be created programmatically from another (custom) Ant task?
Date Sat, 16 May 2015 13:38:53 GMT

I've developed a few custom Ant tasks over time, but I need a little help
doing something specific to Ant's data types.  I've created a task that
retrieves a set of files from a server, but the names aren't known in
advance, they're determine during execution of the task.  I'd like to
create a fileset that has an ID and can be referred to later on by other
tasks and targets in the build.

This is how I assumed I'd get started:

FileSet fs = new FileSet();

I've some doubts about the "createInclude" logic... but I haven't got that
far yet.  I'm stuck on the "setId()" part which just doesn't exist.

In a build script, I'd write:

<fileset id="someid" dir="somedir">
  <include name="relative/path/to/file" />

... then refer to it later with "refid".

How can I get this to work?


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