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

1.利用

maven-compiler-plugin
<plugin>
<groupId>org.apache.maven.pluginsgroupId>
<artifactId>maven-compiler-pluginartifactId>
<version>3.2version>
<configuration>
<encoding>${maven.compiler.encoding}encoding>
<source>1.6source> 
<target>1.6target>
<compilerArguments>
<extdirs>src\main\webapp\WEB-INF\libextdirs>
compilerArguments>
configuration>
<executions>
<execution>
<phase>compilephase>
execution>
executions>
plugin>

2.利用

dependency
(本人未测试)
<dependency> 
<groupId>org.apachegroupId> 
<artifactId>testartifactId> 
<version>1.0version> 
<scope>systemscope> 
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/xx.jarsystemPath> 
dependency>

转载于:https://www.cnblogs.com/navigate/p/5589990.html

你可能感兴趣的:(java)