Using <fileSets> with maven assemblies

I am trying to add specific directories from maven modules to my assembly. I think this is a way to get back to this.

I would appreciate a clear and concise way of using to get the necessary directories from maven modules that simply contain a directory with some necessary resources.

Please thanks.

Gc

+3
source share
1 answer

If you want to include whole modules, use modulesSets, but if you want to choose which files to add, you can use fileSets in the build configuration file from a top-level project, for example:

  <fileSets>
     <fileSet>
        <directory>${basedir}/myModule/src/main/resources</directory>   
        <includes>
           <include>*.txt</include>
        </includes>
     </fileSet>
  </fileSets>
+10
source

Source: https://habr.com/ru/post/1765333/


All Articles