FileUtils.getFiles takes the includes as a comma separated list.
Resource.getIncludes returns the includes as a List<String>.
There seems to be an impedance mismatch here. Do I need to
convert the List into a comma separated String? Do I just
assume there are no commas in the pattern, or is there a way
to escape them? Is there a convenience method to do that?
Also, since there's both getFileNames and getFileAndDirectoryNames,
I assume the former will *never* return the name of a directory?
(The documentation is a bit on the terse side.)
Thanks.
Robert Scholte wrote on 08/11/2011 10:00 AM:
See
http://plexus.codehaus.org/plexus-utils/apidocs/org/codehaus/plexus/util/FileUtils.html
getFiles(), getFileNames(), getFileAndDirectoryNames()
-Robert
----------------------------------------
Date: Thu, 11 Aug 2011 08:02:01 +0200
Subject: Re: iterating over resources in mojo
From: [email protected]
To: [email protected]
I don't have the answer, but I would look in the maven-resources-plugin
source to see how it is done there.
/Anders
On Thu, Aug 11, 2011 at 00:54, Bill Shannon<[email protected]> wrote:
I'm writing a maven plugin. (2.2.1, if it matters.) I can get all the
Resource objects for a project. The Resources might have includes or
excludes specified. How do I iterate over all the resource files,
taking into account the includes and excludes? I was hoping the Resource
or FileSet class would provide an iterator to accomplish this. I'm sure
there must be a method to do this, I just don't know where to look for it.
Thanks.
------------------------------**------------------------------**---------
To unsubscribe, e-mail:
[email protected].**org<[email protected]>
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
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]