You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by jaybytez <ja...@yahoo.com> on 2012/04/25 19:17:14 UTC
Custom plugin - how to resolve wildcards in excludes/includes
So I am creating a custom plugin that we are using for compiling things like
Drools Rules.
I have successfully injected and used excludes to help exclude files from
this compilation.
I would like to take advantage of the wildcarding commonly used in
includes/excludes like "**/*.xls".
Is there a Maven/Mojo class that can be used to help resolve or match a
String to these expressions, as I assume these aren't standard regular
expressions.
That way if I have multiple files, I could use this helper class in my
custom plugin to match resources files with the exclusion list.
Thanks...
--
View this message in context: http://maven.40175.n5.nabble.com/Custom-plugin-how-to-resolve-wildcards-in-excludes-includes-tp5665480p5665480.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Custom plugin - how to resolve wildcards in excludes/includes
Posted by Tim Drury <td...@gmail.com>.
Take a look at PlexusUtils' FileUtils class:
http://plexus.codehaus.org/plexus-utils/apidocs/org/codehaus/plexus/util/FileUtils.html
Look at the getFileName() methods and variants. They use DirectoryScanner
which handles "**" wildcards and such.
-tim
On Wed, Apr 25, 2012 at 1:17 PM, jaybytez <ja...@yahoo.com> wrote:
> So I am creating a custom plugin that we are using for compiling things
> like
> Drools Rules.
>
> I have successfully injected and used excludes to help exclude files from
> this compilation.
>
> I would like to take advantage of the wildcarding commonly used in
> includes/excludes like "**/*.xls".
>
> Is there a Maven/Mojo class that can be used to help resolve or match a
> String to these expressions, as I assume these aren't standard regular
> expressions.
>
> That way if I have multiple files, I could use this helper class in my
> custom plugin to match resources files with the exclusion list.
>
> Thanks...
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/Custom-plugin-how-to-resolve-wildcards-in-excludes-includes-tp5665480p5665480.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>