1. 将jar包拷贝到src\main\webapp\WEB-INF\lib目录
2. 编辑pom.xml
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
<compilerArguments>
<extdirs>src\main\webapp\WEB-INF\lib</extdirs>
</compilerArguments>
</configuration>
</plugin>
</plugins>
</build>
本文介绍如何在Maven项目中配置外部jar包。主要包括将jar包放置于src/main/webapp/WEB-INF/lib目录下,并在pom.xml文件中编辑maven-compiler-plugin插件配置,设置编译源代码使用的JDK版本为1.6,目标代码版本为1.6,编译字符集为UTF-8,并指定外部依赖路径。
3045

被折叠的 条评论
为什么被折叠?



