ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: <patternset> in a <javac> task
Date Tue, 10 Jul 2001 13:31:53 GMT
On Tue, 10 Jul 2001, Steffen Euch <> wrote:

> I want to use a <patternset> in a <javac> task.
> And the DTD says that it is possible, too, but I can't find the
> right syntax.

you are close 8-)

>     <javac
>         destdir="${PRJ_CLASSES}"
>         classpath="${myenv.CLASSPATH}"
>         debug="on"
>         deprecation="off"
>         failonerror="on"
>     >
>         <!-- scr or scrdir is missing here --> 
>       <patternset refid="ps-ep-resource"/> 
>     </javac>

Just add the src or srcdir there.  If it is only one src directory,
use javac's srcdir attribute probably srcdir="${PRJ_SRC}" -
alternatively, you can use a nested <src> element, but as this is a
path and not a fileset, you cannot nest the patternset into it
(<javac> is somewhat like the union of filesets with directories taken
from the <src> elements).

BTW, you shouldn't need the classpath construct above as Ant adds your
CLASSPATH to the javac command automatically.


View raw message