1)从支付宝官网上下载sdk 

https://doc.open.alipay.com/doc2/detail?treeId=54&articleId=103419&docType=1

alipay-sdk-java20151021120052.jar 

2)制作本地安装包

alipay-sdk-java20151021120052.jar 放到D: 盘根目录下

执行命令:cmd 定位到D: 盘下

 mvn install:install-file -DgroupId=com.alipay -DartifactId=sdk-Java -Dversion=20151021120052 -Dpackaging=jar -Dfile=alipay-sdk-java20151021120052.jar

 

 

手动导入jar包到本地maven库_安装包

手动导入jar包到本地maven库_jar_02

出现上图所示,代表编译完成

 

[INFO] Installing D:\alipay-sdk-java20151021120052.jar to C:\Users\Computer\.m2\repository\com\alipay\sdk-java\20151021120052\sdk-java-20151021120052.jar

引入方法:pom.xml 加入

 <dependency>
       <groupId>com.alipay</groupId>
       <artifactId>sdk-java</artifactId>
       <version>20151021120052</version>
 </dependency>

 

 

执行maven update  即可 更新到 工程下

 

### 直接引入本地lib

<dependency>
    <groupId>com.swetake</groupId>
    <artifactId>Qrcode</artifactId>
    <version>Qrcode</version>
    <scope>system</scope>
    <systemPath>${project.basedir}/lib/QRCode.jar</systemPath>
</dependency>