Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 56262 invoked from network); 4 Aug 2008 21:05:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Aug 2008 21:05:56 -0000 Received: (qmail 59125 invoked by uid 500); 4 Aug 2008 21:05:51 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 59099 invoked by uid 500); 4 Aug 2008 21:05:51 -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 59088 invoked by uid 99); 4 Aug 2008 21:05:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Aug 2008 14:05:51 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [206.190.58.157] (HELO web55108.mail.re4.yahoo.com) (206.190.58.157) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 04 Aug 2008 21:04:55 +0000 Received: (qmail 76175 invoked by uid 60001); 4 Aug 2008 21:04:21 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=ccbSe4X3n+t7URu/2JZWgVMxEFqmTZUX8Xgumuy87Zm73WTKWiREEDqaTfKOFPtIuhXxNTQL7mfB5orPMhz25PxjL4vMegzdz7mA++wB4cR2SriGj0D63FdD55RlT6qDjfAyVsKfjrbqGa9BahbNjaiH7l3v4D5fhHRGZUQLuLk=; X-YMail-OSG: BcCa2yoVM1nZMd..WY61KK.yfsT0imSqhsOaqITdRrNyIWMx..KYWeXnZjMCcys8TmC9SNVtGJotyN83lcAB9iGar8IsJaXiNpAsvnoL0VROQwH51h4RoS07JeQX0eagEPpTw4t.8Qg5XTJq6ki7_is- Received: from [67.142.130.29] by web55108.mail.re4.yahoo.com via HTTP; Mon, 04 Aug 2008 14:04:20 PDT Date: Mon, 4 Aug 2008 14:04:20 -0700 (PDT) From: Matt Benson Subject: RE: using filesets in a custom task To: Ant Users List In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <982159.75682.qm@web55108.mail.re4.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org --- EJ Ciramella wrote: > The larger problem was, addFileset versus > addConfiguredFileset. > > Then once that worked (as it would just keep saying > I have to set the > "dir" attribute - which was set), then I noticed > that you could do > fileset.getDirectoryScanner(getProject()) and from > that I could do > ds.getIncludedFiles() and get a string array of the > files included. But > the files included are simply the files, with no > absolute path. > > I didn't know about the iterator at all (thank you, > that will clean up > my code a bit) as I was using the examples found > here: > > http://ant.apache.org/manual/tutorial-tasks-filesets-properties.html > > Maybe it's time to update the examples? > That's possible, yes. :) -Matt > -----Original Message----- > From: Matt Benson [mailto:gudnabrsam@yahoo.com] > Sent: Monday, August 04, 2008 4:44 PM > To: Ant Users List > Subject: RE: using filesets in a custom task > > > --- EJ Ciramella wrote: > > > Yeah, kinda strange, why would you want a fileset > > vector of just the > > File.getName() instead of File.getAbsolutePath()? > > > > What exactly are you trying to accomplish? Beyond > Ant > 1.7, it's quite easy to take the iterator() of a > fileset, knowing it will return FileResource > elements > from which you can get the File if you need the > actual > File object. If you are simply reading from or > writing to the files, you can use the Resources' > InputStreams/OutputStreams directly. > > -Matt > > > -----Original Message----- > > From: Matt Benson [mailto:gudnabrsam@yahoo.com] > > Sent: Monday, August 04, 2008 3:09 PM > > To: Ant Users List > > Subject: RE: using filesets in a custom task > > > > > > --- EJ Ciramella wrote: > > > > > The next bit is how to get the fully qualified > > path > > > to the fileset if it > > > is for a list of files outside of your current > > > working directory. > > > > > > Any takers? > > > > > > > You are using Ant 1.7 or 1.7.1? By "path to the > > fileset" you mean basedir? A fileset's basedir, > or > > "dir", is a File object, so by that time you're > > looking at a plain API call on java.io.File. > > > > -Matt > > > > > -----Original Message----- > > > From: EJ Ciramella > > [mailto:ejciramella@upromise.com] > > > > > > Sent: Monday, August 04, 2008 2:56 PM > > > To: Ant Users List > > > Subject: RE: using filesets in a custom task > > > > > > Wow - as simple as the difference between > > > addFileset(FileSet f) and > > > addConfiguredFileset(FileSet f). > > > > > > > > > > > > -----Original Message----- > > > From: EJ Ciramella > > [mailto:ejciramella@upromise.com] > > > > > > Sent: Monday, August 04, 2008 11:57 AM > > > To: Ant Users List > > > Subject: RE: using filesets in a custom task > > > > > > Any other suggestions from anyone? Why does ant > > > thing I'm not supplying > > > the "dir" attribute to the flieset? > > > > > > > > > -----Original Message----- > > > From: EJ Ciramella > > [mailto:ejciramella@upromise.com] > > > > > > Sent: Friday, August 01, 2008 3:16 PM > > > To: Ant Users List > > > Subject: RE: using filesets in a custom task > > > > > > No exceptions, just this: > > > > > > Class m2utils.converters.SnapshotConverter > loaded > > > from parent loader > > > (parentFirst) > > > +Datatype snapshotconverter > > > m2utils.converters.SnapshotConverter > > > [snapshotconverter] how many filesets? 1 > > > [snapshotconverter] about to process null > > > > > > -----Original Message----- > > > From: Peters, John > [mailto:John.Peters@bcbsfl.com] > > > > > Sent: Friday, August 01, 2008 3:13 PM > > > To: Ant Users List > > > Subject: RE: using filesets in a custom task > > > > > > Do you have an error message? > > > > > > -----Original Message----- > > > From: EJ Ciramella > > [mailto:ejciramella@upromise.com] > > > > > > Sent: Friday, August 01, 2008 3:10 PM > > > To: Ant Users List > > > Subject: RE: using filesets in a custom task > > > > > > It's as simple as this so far: > > > > > > public void addFileset(FileSet fileset) { > > > filesets.add(fileset); > > > System.out.println("how many filesets? > > > "+filesets.size()); > > > for(int x = 0; x < filesets.size(); x++) > > > { > > > System.out.println("about to process > > > "+filesets.get(x).getDir()); > > > } > > > } > > > > > > With a matching task of this: > > > > > > > > > > > > classname="m2utils.converters.SnapshotConverter"/> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -----Original Message----- > > > From: Peters, John > [mailto:John.Peters@bcbsfl.com] > > > Sent: Friday, August 01, 2008 3:02 PM > > > To: Ant Users List > > > Subject: RE: using filesets in a custom task > > > > > > Post your code please > > > > > > -----Original Message----- > > > From: EJ Ciramella > > [mailto:ejciramella@upromise.com] > > > Sent: Friday, August 01, 2008 3:00 PM > > > To: user@ant.apache.org > > > Subject: using filesets in a custom task > > > > > > I'm struggling to write a custom task that > > utilizes > > > filesets. No matter > > > what I do, it doesn't seem to set/understand the > > > "dir" attribute to the > > > fileset. > > > > > > > > > > > > Any suggestions? > > > > > > > > > > > > > > > Blue Cross Blue Shield of Florida, Inc., and its > > > subsidiary and > > > affiliate companies are not responsible for > errors > > > or omissions in this > > > e-mail message. Any personal comments made in > this > > > e-mail do not reflect > > > the views of Blue Cross Blue Shield of Florida, > > Inc. > > > The information > > > contained in this document may be confidential > and > > > intended solely for > > > the use of the individual or entity to whom it > is > > > addressed. This > > > document may contain material that is privileged > > or > > > protected from > > > disclosure under applicable law. If you are not > > the > > > intended recipient > > > or the individual responsible for delivering to > > the > > > intended recipient, > > > please (1) be advised that any use, > dissemination, > > > forwarding, or > > > copying of this document IS STRICTLY PROHIBITED; > > and > > > (2) notify sender > > > immediately by telephone and destroy the > document. > > > THANK YOU. > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: > > > user-unsubscribe@ant.apache.org For additional > > > commands, e-mail: user-help@ant.apache.org > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: > > > user-unsubscribe@ant.apache.org For additional > > > commands, e-mail: user-help@ant.apache.org > > > > > > > > > > > > > > > > > > Blue Cross Blue Shield of Florida, Inc., and its > > > subsidiary and > > > affiliate companies are not responsible for > errors > > > or omissions in this > > > e-mail message. Any personal comments made in > this > > > e-mail do not reflect > > > the views of Blue Cross Blue Shield of Florida, > > Inc. > > > The information > > > contained in this document may be confidential > and > > > intended solely for > > > the use of the individual or entity to whom it > is > > > addressed. This > > > document may contain material that is privileged > > or > > > protected from > > > disclosure under applicable law. If you are not > > the > > > intended recipient > > > or the individual responsible for delivering to > > the > > > intended recipient, > > > please (1) be advised that any use, > dissemination, > > > forwarding, or > > > copying of this document IS STRICTLY PROHIBITED; > > and > > > (2) notify sender > > > immediately by telephone and destroy the > document. > > > THANK YOU. > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: > > > user-unsubscribe@ant.apache.org > > > For additional commands, e-mail: > > > user-help@ant.apache.org > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: > > > user-unsubscribe@ant.apache.org > > > For additional commands, e-mail: > > > user-help@ant.apache.org > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: > > > user-unsubscribe@ant.apache.org > > > For additional commands, e-mail: > > > user-help@ant.apache.org > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: > > > user-unsubscribe@ant.apache.org > > > For additional commands, e-mail: > > > user-help@ant.apache.org > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: > > > user-unsubscribe@ant.apache.org > > > For additional commands, e-mail: > > > user-help@ant.apache.org > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > > user-unsubscribe@ant.apache.org > > For additional commands, e-mail: > > user-help@ant.apache.org > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > > user-unsubscribe@ant.apache.org > > For additional commands, e-mail: > > user-help@ant.apache.org > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > user-unsubscribe@ant.apache.org > For additional commands, e-mail: > user-help@ant.apache.org > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > user-unsubscribe@ant.apache.org > For additional commands, e-mail: > user-help@ant.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org