Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@apache.org Received: (qmail 1673 invoked from network); 13 Mar 2002 11:45:09 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 13 Mar 2002 11:45:09 -0000 Received: (qmail 2159 invoked by uid 97); 13 Mar 2002 11:45:00 -0000 Delivered-To: qmlist-jakarta-archive-ant-user@jakarta.apache.org Received: (qmail 2143 invoked by uid 97); 13 Mar 2002 11:44:59 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 2132 invoked from network); 13 Mar 2002 11:44:59 -0000 Content-Type: text/plain; charset="iso-8859-1" From: stephan beal Reply-To: stephan@einsurance.de To: ant-user@jakarta.apache.org Subject: launching targets based on file dependencies? Date: Wed, 13 Mar 2002 12:45:06 +0100 X-Mailer: KMail [version 1.3.2] MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID: X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hello, fellow anters, i'm finally getting my hands dirty with ant, and i'm having trouble with what is probably a simple concept: i have a set of Java files which are generated from info in a text file. Using 'make' it is very simple to rebuild the java files only if the text file is updated. i have not yet found a way to do this using ant. i have read about DependSet, but says: "The dependset task compares a set of source files with a set of target files. If any of the source files is more recent than any of the target files, all of the target files are removed." That doesn't help me at all, however. Well, perhaps a little bit. What i need to do is regenerate the .java files if the txt file is newer. i can envision using DependSet to delete the java files if they are out of date, then regenerating the files, but i cannot see a way (using "pure ant") to rebuild the java files ONLY if the text file is newer. The only way i can see doing this is using shell commands. Sure, i can run those from ant, but the whole point of ant is to not use shell code. (i've already got to run shell code to regenerate the files, though.) The major problem here is that if i regenerate the java files on each build, the build takes more than 20 minutes longer than it does if the java files are not regenerated, so i cannot be sloppy and simply force a full build each time. (For the curious, the generated classes are a database layer, which almost everything in our 1700-class tree depends on, and Javac will force a recompile of almost every file if our db layer is updated.) How does one trigger the execution of a target based on real file dependencies (i.e., make-style, where deps are assumed to be files, as opposed to ant-style, where deps are logical targets)? Any tips would be greatly appreciated, ----- stephan Generic Universal Computer Guy stephan@einsurance.de - http://www.einsurance.de Office: +49 (89) �552 92 862 Handy: �+49 (179) 211 97 67 "Unix: the shell is your oyster." -- To unsubscribe, e-mail: For additional commands, e-mail: