Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 29698 invoked from network); 2 May 2008 14:50:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 May 2008 14:50:27 -0000 Received: (qmail 87530 invoked by uid 500); 2 May 2008 14:50:25 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 87319 invoked by uid 500); 2 May 2008 14:50:24 -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 87308 invoked by uid 99); 2 May 2008 14:50:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 May 2008 07:50:24 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [207.69.200.58] (HELO pop05.mail.atl.earthlink.net) (207.69.200.58) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 May 2008 14:49:37 +0000 Received: from nc-71-49-176-136.dhcp.embarqhsd.net ([71.49.176.136] helo=flossware.homelinux.org) by pop05.mail.atl.earthlink.net with esmtp (Exim 3.36 #1) id 1Jrwa4-00027i-00 for user@ant.apache.org; Fri, 02 May 2008 10:49:48 -0400 Received: from workstation.flossware.com (workstation.flossware.com [192.168.168.2]) by flossware.homelinux.org (Postfix) with ESMTP id C77075FED8 for ; Fri, 2 May 2008 10:49:47 -0400 (EDT) Message-ID: <481B2A0B.4050401@mindspring.com> Date: Fri, 02 May 2008 10:49:47 -0400 From: "Scot P. Floess" Reply-To: floess@mindspring.com User-Agent: Thunderbird 2.0.0.12 (X11/20080213) MIME-Version: 1.0 To: Ant Users List Subject: Re: Programmatically create a fileset and reference References: <481A1C47.40405@snet.net> <481A70C4.5010400@mindspring.com> <481B164F.9080708@activevos.com> <481B1B4D.4010108@mindspring.com> <481B2878.6070902@activevos.com> In-Reply-To: <481B2878.6070902@activevos.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org I see... Have you considered using escape characters where the spaces are in the property? So, curious, you are using build.xml's in a jar file? Or, do you extract from the jar file and then use those files? Jeremy Weber wrote: > Sure does, filelist accepts a set of files delimited by a space... So > when a path has a space it doesnt behave. Have used ant-contrib > plenty of times in the past, buts that not an option. The kicker is > this isnt a normal ant environment, but actually all the build files, > etc are in a jar when they are executed. Although I havent tried > ant-contrib, this environment causes problems with similiar tasks > ant-call, ant, etc. > > Scot P. Floess wrote: >> OK I think I see the problem. It breaks down due to the space? >> >> Have you looked at Ant Contrib? >> >> They have a task that may help you. It uses delimiters - in >> this case you can define the delimiter as a comma. You might also >> want to define in a macrodef (sorry I am a huge huge fan of >> macrodefs)... >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> Keep in mind, I just whipped this out ;) >> >> To use: >> >> >> >> > "new-directory"/> >> >> Note that property attribute simply lists the property name...not >> using the dollar notation as that is taken care of in the task >> via ${@{property}} >> >> HTH, >> >> Flossy >> >> >> Jeremy Weber wrote: >>> Not sure that accomplishes what I need to do. The problem I wish to >>> solve is this: >>> >>> I have a property that equates to this: >>> >>> >>> >>> The value of this property is variable. >>> >>> I then have a couple of tasks that perform the following: >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> * >>> * >>> This all works great (although not so straight forward), until there >>> is a space in one of the paths in jdbc.jar property. If you have >>> another approach I'd be willing to try but I dont think your suggest >>> will work for this. >>> * >>> >>> >>> * >>> >>> Scot P. Floess wrote: >>>> Have you considered using a macrodef and elements? >>>> >>>> Maybe something like: >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> Then you can supply whatever you want in as long as it >>>> adheres to allowances.... >>>> >>>> Jeremy Weber wrote: >>>>> Hi All, >>>>> >>>>> I have created dozen of custom tasks before, but find myself >>>>> struggling with this one. I wish to create a task that does the >>>>> following: >>>>> >>>>> 1. Accepts a file attribute to represent the absolute path of a >>>>> file contains comma separated absolute paths. >>>>> a. this file name will be read in, parsed and each file found >>>>> will be added to a fileset object, which in term is added to a >>>>> resources object. >>>>> 2. Accepts a id property >>>>> a. this id will be the id of the resource created in step 1a. >>>>> >>>>> So essentially I want... >>>>> >>>>> >>>>> >>>>> I am unclear on how to add the fileset i create in my code to the >>>>> project. Additionally I am unsure of how to assign this an 'id' >>>>> that I can reference elsewhere. Basically what I want to be able >>>>> to do is create a collection of files on the fly which I can >>>>> reference on the fly. Essentially in the following snippet, the >>>>> resources element would be replaced by my new task element >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> Any help at all would be appreciated. >>>>> >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org >>>>> For additional commands, e-mail: user-help@ant.apache.org >>>>> >>>>> >>>> >>> >> > -- Scot P. Floess 27 Lake Royale Louisburg, NC 27549 252-478-8087 (Home) 919-754-4592 (Work) Chief Architect JPlate http://sourceforge.net/projects/jplate Chief Architect JavaPIM http://sourceforge.net/projects/javapim Architect Keros http://sourceforge.net/projects/keros --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org