将资源打包为仅使用maven的jar [英] package resources only as jar using maven
本文介绍了将资源打包为仅使用maven的jar的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想只将目录 src / main / resources
下的资源打包到maven发布的jar中。有没有办法做到这一点?
I want to package only resources under directory src/main/resources
into the jar published by maven. Is there a way to do that?
推荐答案
试试以下内容:
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
</resource>
</resources>
<plugins>
<plugin>
...
</plugin>
</plugins>
...
</build>
据我所知,这可能是你要求的。
As far as I can understand, it could be what you asked for.
这篇关于将资源打包为仅使用maven的jar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文