Hi

Yes Jan sent me a link to an article about this - it is perfect for what I need!!

Thanks

>From: Erik Hatcher <[EMAIL PROTECTED]>
>Reply-To: "Ant Users List" <user@ant.apache.org>
>To: "Ant Users List" <user@ant.apache.org>
>Subject: Re: Ant paths
>Date: Wed, 4 May 2005 07:05:14 -0400
>MIME-Version: 1.0 (Apple Message framework v728)
>Received: from mail.apache.org ([209.237.227.199]) by mc10-f3.hotmail.com with Microsoft SMTPSVC(6.0.3790.211); Wed, 4 May 2005 04:06:43 -0700
>Received: (qmail 69630 invoked by uid 500); 4 May 2005 11:07:34 -0000
>Received: (qmail 69572 invoked by uid 99); 4 May 2005 11:07:33 -0000
>Received: pass (hermes.apache.org: local policy)
>Received: from Unknown (HELO ehatchersolutions.com) (69.55.225.129) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 04 May 2005 04:07:33 -0700
>Received: by ehatchersolutions.com (Postfix, from userid 504)id BAA4213E2006; Wed, 4 May 2005 07:05:29 -0400 (EDT)
>Received: from [192.168.1.101] (va-chrvlle-cad1-bdgrp1-4b-b-169.chvlva.adelphia.net [68.169.41.169])by ehatchersolutions.com (Postfix) with ESMTP id 8AE1F13E2005for <user@ant.apache.org>; Wed, 4 May 2005 07:05:16 -0400 (EDT)
>X-Message-Info: JGTYoYF78jEHjJx36Oi8+Z3TmmkSEdPtfpLB7P/ybN8=
>Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
>Precedence: bulk
>List-Unsubscribe: <mailto:[EMAIL PROTECTED]>
>List-Subscribe: <mailto:[EMAIL PROTECTED]>
>List-Help: <mailto:[EMAIL PROTECTED]>
>List-Post: <mailto:user@ant.apache.org>
>List-Id: "Ant Users List" <user.ant.apache.org>
>Delivered-To: mailing list user@ant.apache.org
>X-ASF-Spam-Status: No, hits=0.0 required=10.0tests=
>X-Spam-Check-By: apache.org
>References: <[EMAIL PROTECTED]>
>X-Mailer: Apple Mail (2.728)
>X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on javelina
>X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_NJABL_DUL,RCVD_IN_SORBS_DUL autolearn=no version=3.0.1
>X-Spam-Level:
>X-Virus-Checked: Checked
>Return-Path: [EMAIL PROTECTED]
>X-OriginalArrivalTime: 04 May 2005 11:06:43.0534 (UTC) FILETIME=[5AE89EE0:01C55099]
>
>
>On May 3, 2005, at 2:48 PM, Ben Gill wrote:
>
>>Hi,
>>
>>The only reason I am even including Spring.jar - is because Spring
>>API supports loading of files using the ant style **/*.xml
>>paths... (which is really useful especially for my custom task..)
>>
>>But in theory, I should not need to include spring.jar for this
>>support - as the logic to map these paths to File resoures must be
>>in the ant core API somewhere...
>>
>>The question is, where are the classes that do this mapping
>>(between path + file(s)), are they public, and do they have the
>>interfaces I need?
>>
>>I currently call:
>>
>>org.springframework.core.io.support.PathMatchingResourcePatternResolve
>>r p =
>> new
>>org.springframework.core.io.support.PathMatchingResourcePatternResolve
>>r();
>>
>> org.springframework.core.io.Resource[] resources =
>>p.getResources(antStylePath);
>>
>> if (resources != null) {
>>
>> info("Loaded [" + resources.length + "]
>>resources from file");
>>
>> for (int resourceNum=0; resourceNum <
>>resources.length; resourceNum++) {
>>
>> org.springframework.core.io.Resource
>>resource = resources[resourceNum];
>>
>> String fileName = resource.getFile
>>().getAbsolutePath();
>> debug("Processing file [" + fileName +
>>"]");
>>
>>Any help on this would be appreciated - it may save me having to
>>include the 1.2MB spring.jar file with the distribution..
>>
>>Ben
>>
>>I am sure there is probably a core Ant class I could use for this
>>support - the code must be in there somewhere!
>>
>>But including spring works anyhow..
>
>Have a look at Ant's Fileset and the way tasks use it with the
>DirectoryScanner (hopefully I'm not speaking of ancient API! :) -
>the facility to deal with patternsets (**/*.xml, for example) is
>built right in.
>
>Taking a look at some of Ant's tasks source code will be very
>helpful in this regard - such as the <copy> task.
>
> Erik
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to