开发者

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

开发者 https://www.devze.com 2023-02-04 00:51 出处:网络
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.

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 t开发者_如何学JAVAhis, ideally without using another plugin? Any feedback is appreciated. Thanks.


<resources>
 <resource>
  <directory>.</directory>
  <includes>
    <include>etc/**/*.*</include>
  </includes>
 </resource>
</resources>
0

精彩评论

暂无评论...
验证码 换一张
取 消