ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <>
Subject Re: excludes attribute with Javac task
Date Wed, 16 May 2001 15:42:25 GMT
--- "DUBCHAK, JOHN [Non-Pharmacia/1000]" <>
> I am having difficulty getting a group of files excluded during
> execution of my compilation target.  The section from my build.xml file
> is as follows:
>     <javac srcdir="${src}" destdir="${build}"
>           excludes="c:\source\Directory_to_be_excluded\**">
>       <classpath path="${classpath}"
> location="c:\java\vbroker\lib\vbjorb.jar"/>
>       <classpath path="${classpath}"
> location="c:\java\j2sdkee1.2.1\lib\j2ee.jar"/>
>     </javac>
> But, the compilation tries to compile all of the java files located
> within that subdirectory.  Am I using this correctly?

Nope. Change the "excludes" to be relative to the ${src} directory (eg.,
if ${src} is set to c:/source, use

Also, you're doubling up the files/dirs specified in the ${classpath}
property by including ${classpath} twice. You should do something like:
    <pathelement path="${classpath}"/>
    <pathelement location="c:\java\vbroker\lib\vbjorb.jar"/>
    <pathelement location="c:\java\j2sdkee1.2.1\lib\j2ee.jar"/>



Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices

View raw message