打war包時無法把src/main/java裡的xml檔案打包上去

x號開發者發表於2019-03-06

maven打包預設打src/mian/resource裡面的xml,而不會去src/main/java,所以

再pom.xml裡的bulid節點裡加上

<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
</resource>

相關文章