1.利用
maven-compiler-plugin
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.2</version> <configuration> <encoding>${maven.compiler.encoding}</encoding> <source>1.6</source> <target>1.6</target> <compilerArguments> <extdirs>srcmainwebappWEB-INFlib</extdirs> </compilerArguments> </configuration> <executions> <execution> <phase>compile</phase> </execution> </executions> </plugin>
2.利用
dependency
(本人未测试)
<dependency> <groupId>org.apache</groupId> <artifactId>test</artifactId> <version>1.0</version> <scope>system</scope> <systemPath>${basedir}/src/main/webapp/WEB-INF/lib/xx.jar</systemPath> </dependency>