Java Mailing List Archive

http://www.ant-tasks.com/

Apache Ant Archive

» Ant Users List
» Ant Developers List
Exclude Single Java File from Compilation

Exclude Single Java File from Compilation

2005-05-18       - By Lim, Teck Hooi
Reply:     1     2  

Hi,

I want to exclude a single java source from compilation but ant still
compiles that file. The file name is ServiceActivationNotificationBySMS.java
and I included its name in the excludes attribute of <javac> shown below,

 <javac destdir="${build.dir}/prod"
            debug="${compile.debug}"
            deprecation="${compile.deprecation}"
            optimize="${compile.optimize}"
            excludes="**/poa/*.java
**/ServiceActivationNotificationBySMS.java" >

The ant verbose print out, shown below, I get shows that
ServiceActivationNotificationBySMS.java is excluded from the compilation and
yet it get compiled. Any ideas what went wrong? TQ

...
Could not load a dependent class (com/starbase/starteam/Item) for type
stcheckin
Could not load a dependent class (com/starbase/starteam/Item) for type
stcheckout
fileset: Setup scanner in dir D:\shipment\src with patternSet{ includes: []
excludes: [**/poa/*.java, **/ServiceActivationNotificationBySMS.java] }
   [javac] com\acme\ServiceServer.java added as
com/acme/ServiceServer.class doesn't exist.
   [javac] com\acme\Abort.java added as com/acme/command/Abort.class
doesn't exist.
   [javac] com\acme\command\AbstractCMSCommand.java added as
com/acme/command/AbstractCMSCommand.class doesn't exist.
   [javac] com\acme\command\CMSCommandException.java added as
com/acme/command/CMSCommandException.class doesn't exist.
...


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)


©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.