How to include a folder in the jar created by Maven (and not the contents of the folder, the actual folder)

I'm having difficulties including a directory in jar maven. I need the actual directory in the bank, not just the files in it. Using:

<resources> <resource> <directory>etc</directory> </resource> </resources> 

only the contents of the etc directory are included in the jar, not in the actual directory. Is there a simple solution for this, ideally without using another plugin? Any feedback is welcome. Thank you

+4
source share
1 answer
 <resources> <resource> <directory>.</directory> <includes> <include>etc/**/*.*</include> </includes> </resource> </resources> 
+6
source

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


All Articles