有一些冷門的jar包,自己又比較懶,不想上傳上nexus,就直接放web項目中的/WEB-INF/lib目錄了,構建的時候,在編譯期出錯,因爲無法依賴那些jar包,此時用maven的compile插件指定該目錄爲額外的庫目錄即可。
<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>
作者:IamLsz
來源:CSDN
原文:https://blog.csdn.net/imlsz/article/details/49864013
版權聲明:本文爲博主原創文章,轉載請附上博文鏈接!