Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I include a folder in the jar produced by Maven (not the content of the folder, the actual folder)

I'm having some difficulty including a directory into the jar maven is creating. I need the actual directory in the jar, not just the files in it. By using:

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

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

like image 529
Eugen Avatar asked Jan 14 '11 12:01

Eugen


1 Answers

<resources>
 <resource>
  <directory>.</directory>
  <includes>
    <include>etc/**/*.*</include>
  </includes>
 </resource>
</resources>
like image 118
lweller Avatar answered Sep 28 '22 08:09

lweller