以支付宝的jar为例:
mvn install:install-file -Dfile=alipay-sdk-java20170829142630.jar -DgroupId=com.alipay -DartifactId=alipay -Dversion=113 -Dpackaging=jar
mvn install:install-file -Dfile=commons-logging-1.1.1.jar -DgroupId=com.alipay.commons-logging -DartifactId=commons-logging -Dversion=113 -Dpackaging=jar
打包成功:
pom.xml文件中添加刚才打包的依赖
<dependency>
<groupId>com.alipay</groupId>
<artifactId>alipay</artifactId>
<version>113</version>
</dependency>
<dependency>
<groupId>com.alipay.commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>113</version>
</dependency>
是不是so easy!