簡體   English   中英

如何在Maven生成的jar中包含一個文件夾(不是文件夾的內容,實際的文件夾)

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

我遇到了一些困難,包括創建jar maven的目錄。 我需要jar中的實際目錄,而不僅僅是其中的文件。 通過使用:

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

只有etc目錄的內容包含在jar中,而不是實際目錄中。 有沒有一個簡單的解決方案,理想情況下不使用另一個插件? 任何反饋都表示贊賞。 謝謝。

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM