<build> <resources> <resource> <directory>src/main/resources</directory> <includes> <include>**/*.properties</include> <include>**/*.xml</include> </includes> <filtering>true</filtering> </resource> </resources> </build>
如上所述,在于在build节点下添加resources节点,指明要添加的目录,以及此目录下的何种文件被添加。
另外,如果想添加本地jar包到maven依赖中,可以如下操作
<dependency> <groupId>javabuilder</groupId> <artifactId>javabuilder</artifactId> <version>1.0</version> <scope>system</scope> <systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/javabuilder.jar</systemPath> </dependency>