1. 程式人生 > >Maven解決編譯時本地JAR包“不存在”&“找不到符號”

Maven解決編譯時本地JAR包“不存在”&“找不到符號”

如題
在pom.xml檔案中新增配置:

<plugin>
               <artifactId>maven-compiler-plugin</artifactId>                                                               
               <configuration>                   
                    <source>1.7</source>                                       
                    <target
>
1.7</target> <encoding>UTF-8</encoding> <compilerArguments> <extdirs>src\main\webapp\WEB-INF\lib</extdirs> </compilerArguments> </configuration>
</plugin>

對應自己的JDK版本和對應的jar包的位置
plugin>的位置是在

project–>build–>plugins–>plugin…