Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 78427 invoked from network); 23 Jun 2008 12:59:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Jun 2008 12:59:09 -0000 Received: (qmail 15765 invoked by uid 500); 23 Jun 2008 12:59:09 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 14943 invoked by uid 500); 23 Jun 2008 12:59:07 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 14930 invoked by uid 99); 23 Jun 2008 12:59:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Jun 2008 05:59:07 -0700 X-ASF-Spam-Status: No, hits=-2.8 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [192.6.10.60] (HELO tobor.hpl.hp.com) (192.6.10.60) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Jun 2008 12:58:14 +0000 Received: from localhost (localhost [127.0.0.1]) by tobor.hpl.hp.com (Postfix) with ESMTP id 11B8BB7B49 for ; Mon, 23 Jun 2008 13:58:05 +0100 (BST) X-Virus-Scanned: amavisd-new at hplb.hpl.hp.com Received: from tobor.hpl.hp.com ([127.0.0.1]) by localhost (tobor.hpl.hp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id eh9QXzJ+22DI for ; Mon, 23 Jun 2008 13:57:59 +0100 (BST) Received: from ha-node-br2.hpl.hp.com (ha-node-br2.hpl.hp.com [16.25.144.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tobor.hpl.hp.com (Postfix) with ESMTPS id 27F8AB7B48 for ; Mon, 23 Jun 2008 13:57:53 +0100 (BST) MailScanner-NULL-Check: 1214830651.74574@Pcw9xvXONeXP86bEsJc96Q Received: from [16.25.171.118] (morzine.hpl.hp.com [16.25.171.118]) by ha-node-br2.hpl.hp.com (8.14.1/8.13.4) with ESMTP id m5NCvUvj000129 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 23 Jun 2008 13:57:31 +0100 (BST) Message-ID: <485F9DC4.1050002@apache.org> Date: Mon, 23 Jun 2008 13:57:40 +0100 From: Steve Loughran User-Agent: Thunderbird 2.0.0.14 (X11/20080421) MIME-Version: 1.0 To: Ant Users List Subject: Re: Advanced includes/excludes for javac References: <1214217614.1136.10.camel@moonlight> In-Reply-To: <1214217614.1136.10.camel@moonlight> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-HPL-MailScanner-Information: Please contact the ISP for more information X-MailScanner-ID: m5NCvUvj000129 X-HPL-MailScanner: Found to be clean X-HPL-MailScanner-From: stevel@apache.org X-Virus-Checked: Checked by ClamAV on apache.org Roman Kennke wrote: > Hi there, > > I have a problem with the javac task that I cannot solve, maybe somebody > can help me. Let's say I have a directory layout like this: > > src/proj1/Class1.java > src/proj1/Class2.java > src/proj2/Class1.java > src/proj2/Class2.java > > Now I want to compile Class1 from proj1 and Class2 from proj2 and > exclude the other two. Also, I need to compile those in one go because > they depend on each other. I didn't find a way to implement this using > the srcdir attribute, or nested src tags. Any ideas? > You are in trouble as javac is going to take over. If it wants something, it may take it anyway. If you have to do this -and the only place I've even encountered such a thing was laptop bioses- the trick is to copy all the files you want to one location, and none of the files you dont want. This will build, but leave you with another nightmare, working out which files are actually included. I would strongly encourage you not to do this. The laptop bioses almost made sense, because they had to fit into a small amount of memory, but even then the copies and the mess of #ifdef blocks meant the usual test for 'is some code in the build' was to edit the file so that it couldn't compile, then see if that broke the build. -- Steve Loughran http://www.1060.org/blogxter/publish/5 Author: Ant in Action http://antbook.org/ --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org