1
我的項目是多模塊在多模塊Maven項目。需要訪問的conf /屬性從一個子文件到另一個孩子
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文件不添加作爲罐子 –
的一部分,儘管你的問題似乎是說,我想知道答案如何尊重你的要求,你想從另一個孩子訪問'test.conf'。 – JimHawkins
我已經加入小孩B兒童A.在依賴關係的conf是JAR的組成部分,現在,我可以訪問這些的conf –