mirror of
https://github.com/yanlongqi/jhinno-openapi-java-sdk.git
synced 2026-03-22 06:15:10 +08:00
上传到maven仓库的配置
This commit is contained in:
61
README.md
61
README.md
@@ -26,22 +26,7 @@
|
||||
|
||||
建议在您的项目中使用Jhinno OpenAPI SDK for Java的方法是从Maven中使用它。:
|
||||
|
||||
#### 方法一:通过Maven仓库安装
|
||||
|
||||
> 添加仓库地址(改方案为备用方案,后续会上传至Maven中央仓库,目前不影响正常使用)
|
||||
|
||||
```xml
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>jhinno-nexus</id>
|
||||
<name>jhinno-nexus</name>
|
||||
<url>https://jhinno-nexus.yuchat.top/repository/maven-releases</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
```
|
||||
|
||||
#### 方法二:通过命令将jar包导入本地Maven仓库
|
||||
#### 方法一:通过命令将jar包导入本地Maven仓库(无网络开发额外配置)
|
||||
|
||||
```shell
|
||||
|
||||
@@ -62,6 +47,14 @@ mvn org.apache.maven.plugins:maven-install-plugin:3.1.1:install-file -Dfile="E:/
|
||||
> - jhinno-openapi-sdk-spring-boot-starter-x.x.x.jar 为SDK的spring-boot-starter的jar包。
|
||||
> - jhinno-openapi-sdk-spring-boot-starter-x.x.x-sources.jar 为SDK的spring-boot-starter的源码包。
|
||||
|
||||
#### 方法二:通过源码导入(无网络开发额外配置)
|
||||
|
||||
```shell
|
||||
git clone https://github.com/yanlongqi/jhinno-openapi-java-sdk.git
|
||||
cd jhinno-openapi-java-sdk
|
||||
mvn clean install
|
||||
```
|
||||
|
||||
### 2.1.2 引入`jhinno-openapi-sdk-spring-boot-starter`坐标
|
||||
|
||||
```xml
|
||||
@@ -69,7 +62,7 @@ mvn org.apache.maven.plugins:maven-install-plugin:3.1.1:install-file -Dfile="E:/
|
||||
<dependency>
|
||||
<groupId>com.jhinno</groupId>
|
||||
<artifactId>jhinno-openapi-sdk-spring-boot-starter</artifactId>
|
||||
<version>1.0.1</version>
|
||||
<version>${最新的版本号}</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
@@ -100,7 +93,8 @@ jhinno.openapi.auth-type=access_secret_mode
|
||||
|
||||
> 注:
|
||||
> - 其中`jhinno.openapi.server-url`为景行接口服务的BaseUrl;
|
||||
> - `auth-type` 认证类型,`token_mode`(Token认证) 和 `access_secret_mode`(AccessKey认证);Appform Release 6.2 `token_mode`作为过渡,将会弃用;
|
||||
> - `auth-type` 认证类型,`token_mode`(Token认证) 和 `access_secret_mode`(AccessKey认证);Appform Release 6.2 `token_mode`
|
||||
作为过渡,将会弃用;
|
||||
> - `jhinno.openapi.used-server-time`是否获取服务器时间来请求token,关闭可提高获取token的时间,但打开有可能因为服务器时间不准确而导致token获取失败的问题。
|
||||
> - `access-key` 和 `access-key-secret` 作为访问接口的凭证,需要提供集成商名称、系统名称、负责人姓名、负责电话电话信息申请。
|
||||
> - 更多配置见`com.jhinno.sdk.openapi.autoconfigure.JHOpenapiProperties`源码。
|
||||
@@ -135,22 +129,7 @@ public class DemoUserSDK {
|
||||
|
||||
建议在您的项目中使用Jhinno OpenAPI SDK for Java的方法是从Maven中使用它。:
|
||||
|
||||
#### 方法一:通过Maven仓库安装
|
||||
|
||||
> 添加仓库地址(改方案为备用方案,后续会上传至Maven中央仓库,目前不影响正常使用)
|
||||
|
||||
```xml
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>jhinno-nexus</id>
|
||||
<name>jhinno-nexus</name>
|
||||
<url>https://jhinno-nexus.yuchat.top/repository/maven-releases</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
```
|
||||
|
||||
#### 方法二:通过命令将jar包导入本地Maven仓库
|
||||
#### 方法一:通过命令将jar包导入本地Maven仓库(无网络开发额外配置)
|
||||
|
||||
```shell
|
||||
|
||||
@@ -164,6 +143,14 @@ mvn org.apache.maven.plugins:maven-install-plugin:3.1.1:install-file -Dfile="E:/
|
||||
> - jhinno-openapi-java-sdk-x.x.x.jar 为SDK的jar包。
|
||||
> - jhinno-openapi-java-sdk-x.x.x-sources.jar 为源码包,添加可方便查看SDK代码的注释。
|
||||
|
||||
#### 方法二:通过源码导入(无网络开发额外配置)
|
||||
|
||||
```shell
|
||||
git clone https://github.com/yanlongqi/jhinno-openapi-java-sdk.git
|
||||
cd jhinno-openapi-java-sdk
|
||||
mvn clean install
|
||||
```
|
||||
|
||||
### 2.2.2 引入`jhinno-openapi-java-sdk`坐标
|
||||
|
||||
```xml
|
||||
@@ -171,7 +158,7 @@ mvn org.apache.maven.plugins:maven-install-plugin:3.1.1:install-file -Dfile="E:/
|
||||
<dependency>
|
||||
<groupId>com.jhinno</groupId>
|
||||
<artifactId>jhinno-openapi-java-sdk</artifactId>
|
||||
<version>1.0.1</version>
|
||||
<version>${最新的版本号}</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
@@ -244,7 +231,7 @@ public class DemoUserSDK {
|
||||
<dependency>
|
||||
<groupId>com.jhinno</groupId>
|
||||
<artifactId>jhinno-openapi-java-sdk</artifactId>
|
||||
<version>2.0.0</version>
|
||||
<version>${最新的版本号}</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
@@ -349,7 +336,7 @@ public class JHAppApiExecution extends JHApiExecution {
|
||||
一旦您检出代码,就可以使用Maven构建它。使用以下命令进行构建:
|
||||
|
||||
```shell
|
||||
mvn clean package -DskipTests -P product
|
||||
mvn clean package
|
||||
```
|
||||
|
||||
# 5. 代码贡献
|
||||
|
||||
@@ -83,6 +83,7 @@
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<compileSourceRoots>src/main/java</compileSourceRoots>
|
||||
<source>${maven.compiler.source}</source>
|
||||
<target>${maven.compiler.target}</target>
|
||||
<encoding>${project.build.sourceEncoding}</encoding>
|
||||
@@ -122,36 +123,7 @@
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>3.3.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-sources</id>
|
||||
<goals>
|
||||
<goal>jar-no-fork</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<developers>
|
||||
<developer>
|
||||
<id>lqyan</id>
|
||||
<name>lqyan</name>
|
||||
<email>lqyan@jhinno.com</email>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
<name>The Apache License, Version 2.0</name>
|
||||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
</project>
|
||||
@@ -17,7 +17,6 @@
|
||||
<version>2.0.3</version>
|
||||
</parent>
|
||||
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.jhinno</groupId>
|
||||
@@ -52,6 +51,7 @@
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<compileSourceRoots>src/main/java</compileSourceRoots>
|
||||
<source>${maven.compiler.source}</source>
|
||||
<target>${maven.compiler.target}</target>
|
||||
<encoding>${project.build.sourceEncoding}</encoding>
|
||||
@@ -76,7 +76,6 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.6.3</version>
|
||||
<configuration>
|
||||
<sourcepath>target/generated-sources/delombok</sourcepath>
|
||||
<encoding>${project.build.sourceEncoding}</encoding>
|
||||
@@ -91,38 +90,7 @@
|
||||
</tags>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>3.3.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-sources</id>
|
||||
<goals>
|
||||
<goal>jar-no-fork</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<developers>
|
||||
<developer>
|
||||
<id>lqyan</id>
|
||||
<name>lqyan</name>
|
||||
<email>lqyan@jhinno.com</email>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
<name>The Apache License, Version 2.0</name>
|
||||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
|
||||
</project>
|
||||
76
pom.xml
76
pom.xml
@@ -10,7 +10,7 @@
|
||||
<packaging>pom</packaging>
|
||||
<name>Jhinno OpenAPI SDK for Java parent</name>
|
||||
<description>The Jhinno OpenAPI SDK for Java used for accessing Jhinno OpenApi Service</description>
|
||||
<url>http://jhinno.com</url>
|
||||
<url>https://github.com/yanlongqi/jhinno-openapi-java-sdk</url>
|
||||
|
||||
|
||||
<properties>
|
||||
@@ -27,23 +27,61 @@
|
||||
<version>2.7.18</version>
|
||||
</parent>
|
||||
|
||||
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>yuchat</id>
|
||||
<url>http://mirrors.yuchat.top/repository/maven-releases/</url>
|
||||
</repository>
|
||||
<!-- <repository>-->
|
||||
<!-- <id>jhinno-releases</id>-->
|
||||
<!-- <url>http://192.168.87.22:8081/repository/maven-releases</url>-->
|
||||
<!-- </repository>-->
|
||||
</distributionManagement>
|
||||
|
||||
<modules>
|
||||
<module>jhinno-openapi-java-sdk</module>
|
||||
<module>jhinno-openapi-sdk-spring-boot-starter</module>
|
||||
</modules>
|
||||
|
||||
<build>
|
||||
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.sonatype.central</groupId>
|
||||
<artifactId>central-publishing-maven-plugin</artifactId>
|
||||
<version>0.5.0</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<publishingServerId>central</publishingServerId>
|
||||
<autoPublish>true</autoPublish>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-gpg-plugin</artifactId>
|
||||
<version>1.6</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>sign-artifacts</id>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>sign</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<gpgArguments>
|
||||
<arg>--pinentry-mode</arg>
|
||||
<arg>loopback</arg>
|
||||
</gpgArguments>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-sources</id>
|
||||
<goals>
|
||||
<goal>jar-no-fork</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
<developers>
|
||||
<developer>
|
||||
@@ -60,4 +98,16 @@
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
<issueManagement>
|
||||
<system>github</system>
|
||||
<url>https://github.com/yanlongqi/jhinno-openapi-java-sdk/issues</url>
|
||||
</issueManagement>
|
||||
|
||||
<scm>
|
||||
<connection>scm:git:https://github.com/yanlongqi/jhinno-openapi-java-sdk.git</connection>
|
||||
<developerConnection>scm:git:https://github.com/yanlongqi/jhinno-openapi-java-sdk.git</developerConnection>
|
||||
<url>https://github.com/yanlongqi/jhinno-openapi-java-sdk</url>
|
||||
</scm>
|
||||
|
||||
|
||||
</project>
|
||||
Reference in New Issue
Block a user