提示:以下是本篇文章正文内容,下面案例可供参考
一、maven引入本地jar
<dependency>
<groupId>*.*</groupId>
<artifactId>openbank-sdk-java</artifactId>
<version>1.1.0-SNAPSHOT</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/openbank-sdk-java-1.1.0.jar</systemPath>
</dependency>
systemPath:指定jar包所在位置
二、install打包
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>compile</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/lib
</outputDirectory>
<includeScope>system</includeScope>
</configuration>
</execution>
</executions>
</plugin>
</plugins>