Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 59299 invoked from network); 21 Jul 2004 14:28:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 21 Jul 2004 14:28:23 -0000 Received: (qmail 60341 invoked by uid 500); 21 Jul 2004 14:27:32 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 60209 invoked by uid 500); 21 Jul 2004 14:27:30 -0000 Mailing-List: contact user-help@ant.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 user@ant.apache.org Received: (qmail 60086 invoked by uid 99); 21 Jul 2004 14:27:29 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [134.132.72.99] (HELO junior.lgc.com) (134.132.72.99) by apache.org (qpsmtpd/0.27.1) with ESMTP; Wed, 21 Jul 2004 07:27:28 -0700 Received: from lgchvw01.lgc.com (lgchvw01.lgc.com [134.132.93.107]) by junior.lgc.com (8.11.7/8.11.3) with SMTP id i6LERI828614 for ; Wed, 21 Jul 2004 09:27:18 -0500 (CDT) Received: from 134.132.93.152 by lgchvw01.lgc.com (InterScan E-Mail VirusWall NT); Wed, 21 Jul 2004 09:27:15 -0500 Received: by lgchexchbh.ad.lgc.com with Internet Mail Service (5.5.2657.72) id ; Wed, 21 Jul 2004 09:27:14 -0500 Message-ID: From: Dominique Devienne To: "'Ant Users List'" Subject: RE: Apply task and missing directories Date: Wed, 21 Jul 2004 09:27:14 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: text/plain X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N > From: Nicolas Girard [mailto:Nicolas.Girard@IReS.in2p3.fr] > > Hi all, > i'm trying to automate the generation of png images from dia diagrams. > The idea is to regularly update a cvs sandbox ; then, if one .dia file > is newer than the associated .png file, i'd just like to launch dia > using the 'apply' task. > > Here's a subset of the script: > > > > > > > > > > > > As you can see, I'd like the .png images to be generated into the > build.design directory, which is different from the src.design directory > where the srcfiles remain. > > Here's my problem: when dealing with, say file > '${src.design}/a/b/test.dia', I get an error message because the output > directory '${build.design}/a/b/' doesn't exist. > > So far I couldn't find an elegant way of creating the missing output > directory before the external program is launched. > > Do you have an idea on how to achieve this ? Interesting. Sounds like you could do it with Ant-Contrib's which can accept a to iterate on (I think), then to extract the directory, then Ant-Contrib's to simulate the mapper, then to create the re-parented directory name. Another option might be to use Ant-Contrib's with your fileset as source file, and a mapper that extracts either the target .png file, or if possible directly the target directory of the .png, and then does a over these directories. In theory, we'd loop only over the directory you need to add, by extracting the out-of-date target files (with allows you to do). The last option is to write a