Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

安装alipay的jar到本地 #17

Open
lockbur opened this issue Feb 12, 2017 · 5 comments
Open

安装alipay的jar到本地 #17

lockbur opened this issue Feb 12, 2017 · 5 comments

Comments

@lockbur
Copy link

lockbur commented Feb 12, 2017

切换到 D:\workspace\jinyinwu\roncoo-pay\roncoo-pay-service\src\lib
#mvn install:install-file -Dfile=alipay-sdk-java20151021120052.jar -DgroupId=alipay -DartifactId=alipay-sdk-java20151021120052 -Dversion=1.0 -Dpackaging=jar

#mvn install:install-file -Dfile=alipay-trade-sdk.jar -DgroupId=alipay -DartifactId=alipay-trade-sdk -Dversion=1.0 -Dpackaging=jar

@cuisongliu
Copy link

我已经把包上传到maven.cuisongliu.com 配置maven中央仓库即可。

@north0808
Copy link

我写了一个脚本,支持安装到本地仓库
查看Pull request #24

@TorGor
Copy link

TorGor commented Jul 1, 2018

我并不能执行一楼的两句 mvn command,可能因为maven 仓库没有资源,而且我尝试了很多maven仓库,都没有找到jar

@cuisongliu
Copy link

@TorGor http://maven.cuisongliu.com/#nexus-search;quick~alipay
<dependency> <groupId>alipay</groupId> <artifactId>alipay-sdk-java20151021120052</artifactId> <version>1.0</version> </dependency>
这个就是你想要的

@TorGor
Copy link

TorGor commented Jul 1, 2018

@cuisongliu
我已经在本地maven 仓库配置了 alipay 的两个 sdk,然后pom 中加入依赖。
显然现在maven 依赖是添加成功了,然后执行了 mvn install 命令,不幸的是出现了一个 javac 的错误
【javac: 无效的标记: D:/Git Repository/Github/roncoo-pay/roncoo-pay-service/lib】,
我不太能理解为什么会去找这个lib,project 中也没有lib。

我尝试了将 两个jar 放到了新建的 lib 目录下,然后仿照 core 的pom再次配置,发现还是失败了。

bingo,roncoo-pay-service** 的 pom 中,使用的 maven plugin 有段配置了使用外部 jar,需要注释掉中的内容。
然后,引用最新的 alipay-java-sdk,2017 or 3.1 ,否则 AliPayUtil 中会爆构造器错误:、
AlipayClient alipayClient = new DefaultAlipayClient();参数不匹配;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants