maven添加lib里面的资源

有一些冷门的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
版权声明:本文为博主原创文章,转载请附上博文链接!

猜你喜欢

转载自blog.51cto.com/11623741/2368245