ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Schulze <>
Subject Re: Use the same <fileset> in multiple <javac> tasks
Date Wed, 27 Jan 2010 16:30:11 GMT
The following doesn't work - it includes all .java files in the srcdir ignoring what is in

<path id="cmdbServiceFiles">
<fileset dir="${}">
<include name="**/cmdb/**" />
<include name="**/handler/**" />
<javac srcdir="${}" sourcepath="${cmdbServiceFiles}" destdir="${classes.dir}"
debug="true" listfiles="true">
<classpath refid="" />
<classpath refid="classpath.lib.other" />
What I need is a way to get the path into the <include ...> tag, but there doesn't seem
to be any way to do that.
I wonder if there is a way to replace the implicit <fileset> in the <javac ...>
task with another fileset.

--- On Tue, 1/26/10, Scot P. Floess <> wrote:

From: Scot P. Floess <>
Subject: Re: Use the same <fileset> in multiple <javac> tasks
To: "Ant Users List" <>
Date: Tuesday, January 26, 2010, 1:18 PM

Can you turn your fileset into a path and use that path as the sourcepath?

On Tue, 26 Jan 2010, Dean Schulze wrote:

> Instead of repeating <include .../> and <exclude ... /> tags I want to declare
a <fileset> once and use it in multiple <javac .../> tasks.
> The problem is that <javac ...> contains an implicit fileset and does not allow
the <fileset > tag inside of it.
> Is there a way to include an external fileset in <javac /> ?
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around

Scot P. Floess
27 Lake Royale
Louisburg, NC  27549

252-478-8087 (Home)
919-890-8117 (Work)

Chief Architect JPlate
Chief Architect JavaPIM

Architect Keros

To unsubscribe, e-mail:
For additional commands, e-mail:

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