The following doesn't work - it includes all .java files in the srcdir ignoring what is in sourcepath:
<path id="cmdbServiceFiles"> <fileset dir="${src.main.java.dir}"> <include name="**/cmdb/**" /> <include name="**/handler/**" /> </fileset> </path> <javac srcdir="${src.main.java.dir}" sourcepath="${cmdbServiceFiles}" destdir="${classes.dir}" debug="true" listfiles="true"> <classpath refid="classpath.metro.tools" /> <classpath refid="classpath.lib.other" /> </javac> 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 <sflo...@nc.rr.com> wrote: From: Scot P. Floess <sflo...@nc.rr.com> Subject: Re: Use the same <fileset> in multiple <javac> tasks To: "Ant Users List" <user@ant.apache.org> 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 > http://mail.yahoo.com Scot P. Floess 27 Lake Royale Louisburg, NC 27549 252-478-8087 (Home) 919-890-8117 (Work) Chief Architect JPlate http://sourceforge.net/projects/jplate Chief Architect JavaPIM http://sourceforge.net/projects/javapim Architect Keros http://sourceforge.net/projects/keros --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org