【发布时间】:2016-12-13 22:15:17
【问题描述】:
我的项目是多模块
parent
|
-----Child A
src/main/resources/test.conf
|
-----Child B
src/main/test/ (from here I want to access conf)
我尝试了多种选择:
1) 添加了 Apache 资源包 (https://maven.apache.org/apache-resource-bundles/)
2) 在 pom.xml 中使用资源标签 With maven - clean package, xml source files are not included in classpath
【问题讨论】:
-
一个观察:我可以添加 .properties 和 .xml。只有 .conf 不作为 jar 的一部分添加
-
虽然您的问题似乎已得到解答,但我想知道答案如何满足您的要求,即您想从另一个孩子那里访问
test.conf。 -
我已将子 B 的依赖项添加到子 A。由于 conf 现在是 jar 的一部分,我可以访问这些 conf
标签: maven maven-plugin