0

i'm trying to filter many source file with maven. my code work perfectly when i specify the files name.

<files>
  <file>
    <source>src/main/default/toto.txt</source>
    <outputDirectory>/default</outputDirectory>
    <filtered>true</filtered>
  </file>
</files>

if i have 30 or more files within default directory how can i add the filter?

i tried something like that :

<source>src/main/default/*.txt</source>

but maven return error

anybody have a solution?

appsofiane
  • 103
  • 2
  • 7

1 Answers1

0

You can actually use the wildcard as mentioned in the Maven doc, and in the example below (taken from the afored mentioned website):

<resources>
   ....
  <resource>
    <directory>src/my-resources</directory>
    <includes>
      <include>**/*.txt</include>
      <include>**/*.rtf</include>
    </includes>
  </resource>
  ...
</resources>
Adonis
  • 4,670
  • 3
  • 37
  • 57