You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Rajkumar Seth <Se...@GNI.co.uk> on 2001/05/21 16:31:21 UTC

Building files in a package in order

I have a package with 60 .java files in it.

I want to compile all these file for every production build.

This works but JAVAC (1.2.2 release 007 and 1.3) complains that 2 classes in
the file are missing.
If I compile these 2 classes first using JAVAC then everything is fine.

My solution was to get ant to build these 2 .java files (and not the other
58 in the directory)
How can I get ant to build just these 2 files before building the rest? 


************************************************************************
The contents of this message and any attachments are confidential and
are intended solely for the attention and use of the addressee only.
Information contained in this message may be subject to legal, 
professional or other privilege or may otherwise be protected by other
legal rules. This message should not be copied or forwarded to any other
person without the express permission of the sender. If you are not the
intended recipient you are not authorised to disclose, copy, distribute
or retain this message or any part of it.

If you have received this message in error, please notify the sender by
telephone (+44-20-7002-4000) and destroy the original message.

We reserve the right to monitor all e-mail messages passing through our
network.
************************************************************************

Re: Building files in a package in order

Posted by Nick Christopher <nw...@visionics.com>.
Use two separate javac tasks in sequence using the includes and excludes
attributes to first select only the two files
and then exclude the two files.

Read the docs on: javac, includes, excludes.

Rajkumar Seth wrote:

> I have a package with 60 .java files in it.
>
> I want to compile all these file for every production build.
>
> This works but JAVAC (1.2.2 release 007 and 1.3) complains that 2 classes in
> the file are missing.
> If I compile these 2 classes first using JAVAC then everything is fine.
>
> My solution was to get ant to build these 2 .java files (and not the other
> 58 in the directory)
> How can I get ant to build just these 2 files before building the rest?
>
> ************************************************************************
> The contents of this message and any attachments are confidential and
> are intended solely for the attention and use of the addressee only.
> Information contained in this message may be subject to legal,
> professional or other privilege or may otherwise be protected by other
> legal rules. This message should not be copied or forwarded to any other
> person without the express permission of the sender. If you are not the
> intended recipient you are not authorised to disclose, copy, distribute
> or retain this message or any part of it.
>
> If you have received this message in error, please notify the sender by
> telephone (+44-20-7002-4000) and destroy the original message.
>
> We reserve the right to monitor all e-mail messages passing through our
> network.
> ************************************************************************


Re: Building files in a package in order

Posted by jp Morgan <jp...@yahoo.com>.
define a path which uses exclude or include for these
files and reference it in javac

--- Rajkumar Seth <Se...@GNI.co.uk> wrote:
> I have a package with 60 .java files in it.
> 
> I want to compile all these file for every
> production build.
> 
> This works but JAVAC (1.2.2 release 007 and 1.3)
> complains that 2 classes in
> the file are missing.
> If I compile these 2 classes first using JAVAC then
> everything is fine.
> 
> My solution was to get ant to build these 2 .java
> files (and not the other
> 58 in the directory)
> How can I get ant to build just these 2 files before
> building the rest? 
> 
> 
>
************************************************************************
> The contents of this message and any attachments are
> confidential and
> are intended solely for the attention and use of the
> addressee only.
> Information contained in this message may be subject
> to legal, 
> professional or other privilege or may otherwise be
> protected by other
> legal rules. This message should not be copied or
> forwarded to any other
> person without the express permission of the sender.
> If you are not the
> intended recipient you are not authorised to
> disclose, copy, distribute
> or retain this message or any part of it.
> 
> If you have received this message in error, please
> notify the sender by
> telephone (+44-20-7002-4000) and destroy the
> original message.
> 
> We reserve the right to monitor all e-mail messages
> passing through our
> network.
>
************************************************************************


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/