支付宝就给了库 的方式.
app支付宝支付接口服务器端eclipse 中pom 中加入引用半天没反应,中央仓库出现中断的情况, 查了一些资料,原来是先下载完数据包之后再用命令导入本地库
D:wlw>mvn install:install-file -DgroupId=com.alipay -DartifactId=sdk-java -Dversion=4.9.13.ALL -Dpackaging=jar -Dfile=alipay-sdk-java-4.9.13.ALL.jar
alipay-sdk-java-4.9.13.ALL.jar
<!-- https://mvnrepository.com/artifact/com.alipay.sdk/alipay-sdk-java -->
<dependency>
<groupId>com.alipay.sdk</groupId>
<artifactId>alipay-sdk-java</artifactId>
<version>4.9.13.ALL</version>
</dependency>
D:>cd wlw D:wlw>mvn install:install-file -DgroupId=com.alipay -DartifactId=sdk-java -Dversion=4.9.13.ALL -Dpackaging=jar -Dfile=alipay-sdk-java-4.9.13.ALL.jar [WARNING] [WARNING] Some problems were encountered while building the effective settings [WARNING] Unrecognised tag: 'mirror' (position: START_TAG seen ...be the preferred | server for that repository. |--> <mirror>... @146:9) @ E:apache-maven-3.5.4in..confsettings.xml, line 146, column 9 [WARNING] Unrecognised tag: 'mirror' (position: START_TAG seen ...be the preferred | server for that repository. |--> <mirror>... @146:9) @ C:Usersadmin.m2settings.xml, line 146, column 9 [WARNING] [INFO] Scanning for projects... [INFO] [INFO] ------------------< org.apache.maven:standalone-pom >------------------- [INFO] Building Maven Stub Project (No POM) 1 [INFO] --------------------------------[ pom ]--------------------------------- [INFO] [INFO] --- maven-install-plugin:2.4:install-file (default-cli) @ standalone-pom --- [INFO] Installing D:wlwalipay-sdk-java-4.9.13.ALL.jar to E:apache-maven-3.5.4Repositoryscomalipaysdk-java4.9.13.ALLsdk-java-4.9.13.ALL.jar [INFO] Installing C:UsersadminAppDataLocalTempmvninstall6621068396855516916.pom to E:apache-maven-3.5.4Repositoryscomalipaysdk-java4.9.13.ALLsdk-java-4.9.13.ALL.pom [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.090 s [INFO] Finished at: 2020-01-14T21:41:15+08:00 [INFO] ------------------------------------------------------------------------
以上虽然在库里边转移了文件,但eclipse 实际是没记录到编辑器中,lib库里边也没有出现alipay 文件
上边报错说识别不了mirror 后来发现是 setting内少了mirrors 父节点.配置了这么久到现在才发现这个问题. 最终mirror 上一级加上mirrors 问题解决