Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using <fileSets> with Maven assemblies

I am trying to add specific directories from Maven modules into my build. I believe that fileSets are the way to go back this.

I would appreciate a clear and concise way of using fileSets to obtain necessary directories from Maven modules that just simply contain a directory with some necessary resources.

like image 414
myusuf3 Avatar asked Nov 07 '25 06:11

myusuf3


1 Answers

If you want to include entire modules, use moduleSets, but if you want to pick and choose which files to add you can use fileSets in an assembly config file from the top level project like this:

  <fileSets>
     <fileSet>
        <directory>${basedir}/myModule/src/main/resources</directory>   
        <includes>
           <include>*.txt</include>
        </includes>
     </fileSet>
  </fileSets>
like image 69
awynne Avatar answered Nov 09 '25 10:11

awynne



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!