Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@apache.org Received: (qmail 94532 invoked from network); 8 Nov 2002 23:01:40 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 8 Nov 2002 23:01:40 -0000 Received: (qmail 23318 invoked by uid 97); 8 Nov 2002 23:02:31 -0000 Delivered-To: qmlist-jakarta-archive-ant-user@jakarta.apache.org Received: (qmail 23302 invoked by uid 97); 8 Nov 2002 23:02:31 -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 23290 invoked by uid 98); 8 Nov 2002 23:02:30 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Message-ID: From: Dominique Devienne To: "'Ant Users List'" Subject: RE: Depend task 0 deletion does stop target execution Date: Fri, 8 Nov 2002 17:01:26 -0600 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N You mean , right? Anyhow, to conditionally execute tasks, you first have to find out if the generation process needs to happen, and then make it happen if needed. The first step is done using either or . The latter is more generic, but doesn't set a property when doing something (deleting the targets when it found they are out-of-date vs. the sources). The former set the property you need, but supports only 1 to 1 (using a mapper) or many-to-1 relationship, and doesn't delete the out-of-date target files. If you go for , you need an additional usually to find out a-posteriori if it did something. If you do with , you may need to delete the target files (depends on your generation process). The second step is done in a separate target executed conditionally based on the target than check whether the target files are up-to-date or not, which sets a property accordingly. All this needs to be wrap in yet another target that depends on the two previous one. ... I hope this helps. --DD -----Original Message----- From: Sebastien BLANC [mailto:Sebastien.Blanc@alcatel.com] Sent: Friday, November 08, 2002 3:57 PM To: ant-user@jakarta.apache.org Subject: Depend task 0 deletion does stop target execution Hello ! I'd like to know if there is a way to perform the following with ant (haven't found anything in doc): I have tasks in my project generating code and meta-data (xdoclet for instance) and I'd like these files not to be regenerated if they were already generated before [and if the source files for the generation were not modified (as javac does)]. The 'Depend' task does not resolve the pb since it's only removing the generated files if time stamp between sources and generation verifies a given order. What I would have expected is that ant would stop the execution of the target if the depend task nested into my target did not detect any file to remove: this way the files would not be regenerated twice. Let me know if I did miss smthg. thanx. seb. -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: