ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Allan <>
Subject RE: how to javac?
Date Wed, 08 May 2002 16:49:59 GMT
> Here is the challenge. We have a pretty messy packaging structure, but
> until this structure is cleaned up the build has to perform some special
> tasks:
> The structure is
> +com
>  +somecompany
>   +packagea
>    {java files}
>   +packageb
>    {java files}
>   +packagec
>    +packagec1
>     {other java files}
>    +packagec2
>     {other java files}
> The goal is to compile packageb and packagec with the exception of
> ClassA and ClassB. I tried many variations of the <javac> task but so
> far wasn't able to exclude ClassA and ClassB from being compiled. 
> Does anybody have a suggestion how the <javac> command has to 
> look like
> to compile packageb and packagec without CassA and ClassB?

I'm new to ant, but I believe the <javac> task creates an implied fileset,
and you can use the includes/excludes attributes to do what you want (at
least that's worked for me).  Try something like

   srcdir = "${srcdir}"
   includes = "com/somecompany/packageb/**,  com/somecompany/packagec/**"
   excludes = "com/somecompany/packagec/**/,

-- Steve
// WRQ has 21 years of experience providing integration software and
// services for host-intensive environments. To learn more about our
// Reflection and Verastream products, visit

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

View raw message