maven依赖非maven库中jar的两种方法

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>src\main\webapp\WEB-INF\lib</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>
posted @ 2016-06-16 10:03  ACaptain  阅读(577)  评论(0编辑  收藏  举报