您的位置:首页 > 其它

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

2016-06-16 10:03 183 查看
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>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: