我的项目是多模块
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
答案 0 :(得分:1)
下面是我的答案,你需要从pom中删除对于conf的排除,如果你有这个插件你可以检查
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${jar.plugin.version}</version>
<configuration>
<excludes>
<exclude>job.xml</exclude>
</excludes>
</configuration>
</plugin>