使用maven构建时无法读取子包

时间:2015-02-27 14:04:59

标签: java eclipse maven

我有一个使用maven构建的项目。在这个项目中,我有" 主要"名为pentaho.kettle.step.plugs.spchr的包和名为pentaho.kettle.step.plugs.spchr.messages的子包。检查图像如下:

enter image description here

但我正在使用maven构建我的项目,它无法检测子包内容。 注意:它不会抛出错误;但没有显示预期的结果。

当我尝试手动导出项目而不使用maven构建时,它运行得很好。

我在这里错过了一些东西吗?请帮助:)

此项目的 pom.xml 位于here

项目中使用的pom.xml的屏幕截图:

Screenshot of the pom.xml used in the project

1 个答案:

答案 0 :(得分:1)

由于您的子包包含属性文件而没有java文件,因此应将其放在src/main/resources/pentaho/kettle/step/plugs/spchr/messages/内。 src/main/java仅适用于java文件。静态资源始终属于src/main/resources/

有关详细信息,请参阅http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html