通过以下配置,让maven打包时,包含自己想要的文件:
<!--打包时 包含xml文件 -->
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/resources</directory> <includes>
<!--包含文件夹以及子文件夹下所有资源 -->
<include>**/*.*</include>
</includes>
</resource>
</resources>
</build>
网友评论