Merge pull request #2 from SkyeBeFreeman/main

add workflows and update docs
pull/5/head
Haotian Zhang 3 years ago committed by GitHub
commit bb7b97b695
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,28 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Java CI with Maven
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout codes
uses: actions/checkout@v2
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
# - name: Build with Maven
# run: mvn -B package --file pom.xml
- name: Test with Maven
run: mvn -B test --file pom.xml

@ -3,4 +3,4 @@
Spring Cloud Tencent follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the Spring Cloud Tencent Code of Conduct Committee via email: SpringCloudTencent_Community@qq.com
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the Spring Cloud Tencent Code of Conduct Committee via email: SpringCloudTencent@tencent.com

@ -68,12 +68,12 @@ Example 列表:
采取与Spring Cloud大版本号相关的版本策略。
项目的版本号格式为 ```大版本号.小版本号.补丁版本号.对应Spring Cloud版本号.发布类型``` 的形式。
大版本号、小版本号、补丁版本号的类型为数字,从 0 开始取值。项目处于孵化器阶段时,大版本号固定使用 0 。
对应Spring Cloud版本号为Spring Cloud提供的英文版本号例如Hoxton、Greenwich等。
发布类型包括正式发布RELEASE、最终测试版RC、测试版BETA
项目的版本号格式为 ```大版本号.小版本号.补丁版本号.对应Spring Cloud的大版本号.对应Spring Cloud的小版本号-发布类型``` 的形式。
大版本号、小版本号、补丁版本号的类型为数字,从 0 开始取值。
对应Spring Cloud的大版本号为Spring Cloud提供的英文版本号例如Hoxton、Greenwich等。对应Spring Cloud的小版本号为Spring Cloud给出的小版本号例如 RS9 等。
发布类型目前包括正式发布和发布候选版RC。在实际的版本号中正式发布版不额外添加发布类型发布候选版将添加后缀并从 RC0 开始
示例:0.1.0.Hoxton.BETA
示例:1.0.0.Hoxton.SR9-RC0
## License
The spring-cloud-tencent is licensed under the BSD 3-Clause License. Copyright and license information can be found in the file [LICENSE](LICENSE)

@ -68,14 +68,14 @@ Example List:
### Version Standard
Adopt a version policy related to Spring Cloud's major version number
We use a version policy related to Spring Cloud's major version number.
Project version includes major version. minor version. patch version. Correspond with the version of Spring Cloud release.
major version. minor version. patch version are in numbers, start from 0. This project is in the incubating phase, major version number is set to 0.
Spring Cloud's version number is the same as the English version number, like Hoxton, Greenwich.
Release type will include RELEASE, RC, BETA.
Project version includes ```${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}.${CORRESPONDING_MAJOR_VERSION_OF_SPRING_CLOUD}.${CORRESPONDING_MINOR_VERSION_OF_SPRING_CLOUD}-${RELEASE_TYPE}```.
```${MAJOR_VERSION}```, ```${MINOR_VERSION}```, ```${PATCH_VERSION}``` are in numbers starting from 0.
```${CORRESPONDING_MAJOR_VERSION_OF_SPRING_CLOUD}``` is the same as the major version number of Spring Cloud, like Hoxton, Greenwich. ```${CORRESPONDING_MINOR_VERSION_OF_SPRING_CLOUD}``` is the same as the major version number of Spring Cloud, like RS9.
```${RELEASE_TYPE}``` is like RELEASE or RC currently. Actually, the RELEASE version does not add a release type in the version, and the RS version will add a suffix and start from RC0.
For example: 0.1.0.Hoxton.BETA
For example: 1.0.0.Hoxton.SR9-RC0
## License
The spring-cloud-tencent is licensed under the BSD 3-Clause License. Copyright and license information can be found in the file [LICENSE](LICENSE)

@ -19,18 +19,25 @@
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
<name>The BSD 3-Clause License (BSD3)</name>
<url>https://raw.githubusercontent.com/Tencent/spring-cloud-tencent/main/LICENSE</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>https://github.com/Tencent/spring-cloud-tencent</url>
<connection>scm:git:git@github.com:Tencent/spring-cloud-tencent.git</connection>
<developerConnection>scm:git:git@github.com:Tencent/spring-cloud-tencent.git</developerConnection>
</scm>
<modules>
<module>spring-cloud-tencent-dependencies</module>
<module>spring-cloud-tencent-starters</module>
<module>spring-cloud-tencent-examples</module>
<module>spring-cloud-tencent-docs</module>
<module>spring-cloud-tencent-converage</module>
<module>spring-cloud-tencent-coverage</module>
</modules>
<developers>
@ -41,17 +48,31 @@
<organization>Tencent</organization>
<url>https://github.com/SkyeBeFreeman/</url>
</developer>
<developer>
<name>Andrew Shan</name>
<email>samshan08@126.com</email>
<organization>Tencent</organization>
</developer>
<developer>
<id>xiaoyao1999hn</id>
<name>Jie Cheng</name>
<email>348893717@qq.com</email>
<organization>Tencent</organization>
<url>https://github.com/xiaoyao1999hn/</url>
</developer>
</developers>
<properties>
<!-- Project revision -->
<revision>0.1.0.Hoxton.BETA</revision>
<revision>1.0.0.Hoxton.SR9</revision>
<!-- Spring Cloud -->
<spring.cloud.version>Hoxton.SR9</spring.cloud.version>
<!-- Polaris -->
<polaris.cient.version>0.8.0-SNAPSHOT</polaris.cient.version>
<polaris.cient.version>1.0.0-SNAPSHOT</polaris.cient.version>
<!-- Maven Plugin Versions -->
<jacoco.version>0.8.3</jacoco.version>
@ -120,31 +141,6 @@
<reuseForks>false</reuseForks>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
@ -172,4 +168,65 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven-gpg-plugin.version}</version>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<distributionManagement>
<snapshotRepository>
<id>nexus-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</snapshotRepository>
<repository>
<id>nexus-releases</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
</profile>
</profiles>
</project>

@ -10,8 +10,12 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>spring-cloud-tencent-converage</artifactId>
<name>Spring Cloud Tencent Converage</name>
<artifactId>spring-cloud-tencent-coverage</artifactId>
<name>Spring Cloud Tencent Coverage</name>
<properties>
<maven.deploy.skip>true</maven.deploy.skip>
</properties>
<dependencies>
<dependency>

@ -12,14 +12,14 @@
<groupId>com.tencent.cloud</groupId>
<artifactId>spring-cloud-tencent-dependencies</artifactId>
<version>0.1.0.Hoxton.BETA</version>
<version>${revision}</version>
<packaging>pom</packaging>
<name>Spring Cloud Tencent Dependencies</name>
<description>Spring Cloud Tencent Dependencies</description>
<properties>
<revision>0.0.1-SNAPSHOT</revision>
<polaris.version>0.8.0-SNAPSHOT</polaris.version>
<revision>1.0.0.Hoxton.SR9</revision>
<polaris.version>1.0.0</polaris.version>
<tomcat.version>10.0.0-M6</tomcat.version>
<powermock.version>2.0.0</powermock.version>
@ -33,7 +33,7 @@
<dependencies>
<dependency>
<artifactId>polaris-dependencies</artifactId>
<groupId>com.tencent.nameservice</groupId>
<groupId>com.tencent.polaris</groupId>
<version>${polaris.version}</version>
<type>pom</type>
<scope>import</scope>

@ -14,4 +14,8 @@
<name>Spring Cloud Tencent Documentation</name>
<packaging>pom</packaging>
<properties>
<maven.deploy.skip>true</maven.deploy.skip>
</properties>
</project>

@ -21,4 +21,8 @@
<module>polaris-circuitbreaker-example</module>
</modules>
<properties>
<maven.deploy.skip>true</maven.deploy.skip>
</properties>
</project>

@ -27,12 +27,12 @@
<!-- Polaris dependencies start -->
<dependency>
<groupId>com.tencent.nameservice</groupId>
<groupId>com.tencent.polaris</groupId>
<artifactId>polaris-discovery-factory</artifactId>
</dependency>
<dependency>
<groupId>com.tencent.nameservice</groupId>
<groupId>com.tencent.polaris</groupId>
<artifactId>polaris-circuitbreaker-factory</artifactId>
</dependency>
<!-- Polaris dependencies end -->

@ -37,18 +37,18 @@
<!-- Polaris dependencies start -->
<dependency>
<groupId>com.tencent.nameservice</groupId>
<groupId>com.tencent.polaris</groupId>
<artifactId>polaris-discovery-factory</artifactId>
</dependency>
<dependency>
<groupId>com.tencent.nameservice</groupId>
<groupId>com.tencent.polaris</groupId>
<artifactId>polaris-test-common</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.tencent.nameservice</groupId>
<groupId>com.tencent.polaris</groupId>
<artifactId>polaris-test-mock-discovery</artifactId>
<scope>test</scope>
</dependency>

@ -27,7 +27,7 @@ import org.springframework.core.env.Environment;
/**
* Properties for Polaris.
*
* @author Haotian Zhang
* @author Haotian Zhang, Andrew Shan, Jie Cheng
*/
@ConfigurationProperties("spring.cloud.polaris.discovery")
public class PolarisProperties {

@ -27,7 +27,7 @@ import java.lang.annotation.Target;
/**
* Annotation for Polaris Client for service configuration.
*
* @author Haotian Zhang
* @author Haotian Zhang, Andrew Shan, Jie Cheng
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)

@ -25,7 +25,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.cloud.client.ConditionalOnDiscoveryEnabled;
/**
* @author Haotian Zhang
* @author Haotian Zhang, Andrew Shan, Jie Cheng
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE, ElementType.METHOD})

@ -32,7 +32,7 @@ import org.springframework.context.annotation.Import;
/**
* Discovery Auto Configuration for Polaris.
*
* @author Haotian Zhang
* @author Haotian Zhang, Andrew Shan, Jie Cheng
*/
@Configuration(proxyBeanMethods = false)
@ConditionalOnPolarisDiscoveryEnabled

@ -26,7 +26,7 @@ import org.springframework.cloud.client.discovery.DiscoveryClient;
/**
* Discovery Client for Polaris.
*
* @author Haotian Zhang
* @author Haotian Zhang, Andrew Shan, Jie Cheng
*/
public class PolarisDiscoveryClient implements DiscoveryClient {

@ -29,7 +29,7 @@ import org.springframework.context.annotation.Configuration;
/**
* Discovery Client Configuration for Polaris.
*
* @author Haotian Zhang
* @author Haotian Zhang, Andrew Shan, Jie Cheng
*/
@Configuration(proxyBeanMethods = false)
@ConditionalOnBlockingDiscoveryEnabled

@ -34,7 +34,7 @@ import org.springframework.stereotype.Component;
/**
* Discovery Handler for Polaris.
*
* @author Haotian Zhang
* @author Haotian Zhang, Andrew Shan, Jie Cheng
*/
@Component
public class PolarisDiscoveryHandler {

@ -29,7 +29,7 @@ import java.util.List;
import org.springframework.cloud.client.ServiceInstance;
/**
* @author Haotian Zhang
* @author Haotian Zhang, Andrew Shan, Jie Cheng
*/
public class PolarisServiceDiscovery {

@ -32,7 +32,7 @@ import reactor.core.scheduler.Schedulers;
/**
* Reactive Discovery Client for Polaris.
*
* @author Haotian Zhang
* @author Haotian Zhang, Andrew Shan, Jie Cheng
*/
public class PolarisReactiveDiscoveryClient implements ReactiveDiscoveryClient {

@ -31,7 +31,7 @@ import org.springframework.context.annotation.Configuration;
/**
* Reactive Discovery Client Configuration for Polaris.
*
* @author Haotian Zhang
* @author Haotian Zhang, Andrew Shan, Jie Cheng
*/
@Configuration(proxyBeanMethods = false)
@ConditionalOnReactiveDiscoveryEnabled

@ -26,7 +26,7 @@ import org.springframework.cloud.client.serviceregistry.ServiceRegistry;
import org.springframework.util.StringUtils;
/**
* @author Haotian Zhang
* @author Haotian Zhang, Andrew Shan, Jie Cheng
*/
public class PolarisAutoServiceRegistration extends AbstractAutoServiceRegistration<Registration> {

@ -28,7 +28,7 @@ import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.client.serviceregistry.Registration;
/**
* @author Haotian Zhang
* @author Haotian Zhang, Andrew Shan, Jie Cheng
*/
public class PolarisRegistration implements Registration, ServiceInstance {

@ -41,7 +41,7 @@ import org.springframework.cloud.client.serviceregistry.ServiceRegistry;
import org.springframework.util.StringUtils;
/**
* @author Haotian Zhang
* @author Haotian Zhang, Andrew Shan, Jie Cheng
*/
public class PolarisServiceRegistry implements ServiceRegistry<Registration> {

@ -34,7 +34,7 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* @author Haotian Zhang
* @author Haotian Zhang, Andrew Shan, Jie Cheng
*/
@Configuration(proxyBeanMethods = false)
@EnableConfigurationProperties

@ -25,7 +25,7 @@ import org.springframework.cloud.netflix.ribbon.RibbonClients;
import org.springframework.context.annotation.Configuration;
/**
* @author Haotian Zhang
* @author Haotian Zhang, Andrew Shan, Jie Cheng
*/
@Configuration(proxyBeanMethods = false)
@EnableConfigurationProperties

@ -26,7 +26,7 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* @author Haotian Zhang
* @author Haotian Zhang, Andrew Shan, Jie Cheng
*/
@Configuration
public class PolarisRibbonServerListConfiguration {

@ -30,7 +30,7 @@ import java.util.ArrayList;
import java.util.List;
/**
* @author Haotian Zhang
* @author Haotian Zhang, Andrew Shan, Jie Cheng
*/
public class PolarisServerList extends AbstractServerList<Server> {

@ -33,19 +33,19 @@
<!-- Polaris dependencies start -->
<dependency>
<groupId>com.tencent.nameservice</groupId>
<groupId>com.tencent.polaris</groupId>
<artifactId>polaris-factory</artifactId>
</dependency>
<dependency>
<groupId>com.tencent.nameservice</groupId>
<groupId>com.tencent.polaris</groupId>
<artifactId>polaris-test-common</artifactId>
<scope>test</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.tencent.nameservice</groupId>
<groupId>com.tencent.polaris</groupId>
<artifactId>polaris-test-mock-discovery</artifactId>
<scope>test</scope>
<optional>true</optional>

@ -33,12 +33,12 @@
<!-- Polaris dependencies start -->
<dependency>
<groupId>com.tencent.nameservice</groupId>
<groupId>com.tencent.polaris</groupId>
<artifactId>polaris-router-factory</artifactId>
</dependency>
<dependency>
<groupId>com.tencent.nameservice</groupId>
<groupId>com.tencent.polaris</groupId>
<artifactId>polaris-test-common</artifactId>
<scope>test</scope>
</dependency>

@ -16,13 +16,13 @@
<properties>
<commons.collections.version>3.2.2</commons.collections.version>
<commons.lang.version>2.5</commons.lang.version>
<commons.io.version>2.6</commons.io.version>
<commons.io.version>2.7</commons.io.version>
</properties>
<dependencies>
<!-- Polaris dependencies start -->
<dependency>
<groupId>com.tencent.nameservice</groupId>
<groupId>com.tencent.polaris</groupId>
<artifactId>polaris-model</artifactId>
</dependency>
<!-- Polaris dependencies end -->
@ -56,12 +56,6 @@
<artifactId>commons-io</artifactId>
<version>${commons.io.version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>28.0-jre</version>
</dependency>
</dependencies>
</project>

@ -23,66 +23,66 @@
<!-- Polaris dependencies start -->
<dependency>
<groupId>com.tencent.nameservice</groupId>
<groupId>com.tencent.polaris</groupId>
<artifactId>polaris-client</artifactId>
</dependency>
<dependency>
<groupId>com.tencent.nameservice</groupId>
<groupId>com.tencent.polaris</groupId>
<artifactId>polaris-plugin-api</artifactId>
</dependency>
<dependency>
<groupId>com.tencent.nameservice</groupId>
<groupId>com.tencent.polaris</groupId>
<artifactId>connector-polaris-grpc</artifactId>
</dependency>
<!--依赖resCache插件-->
<dependency>
<groupId>com.tencent.nameservice</groupId>
<groupId>com.tencent.polaris</groupId>
<artifactId>resource-cache-memory</artifactId>
</dependency>
<!--依赖flowCache插件-->
<dependency>
<groupId>com.tencent.nameservice</groupId>
<groupId>com.tencent.polaris</groupId>
<artifactId>flow-cache-expired</artifactId>
</dependency>
<!--依赖router插件-->
<dependency>
<groupId>com.tencent.nameservice</groupId>
<groupId>com.tencent.polaris</groupId>
<artifactId>router-isolated</artifactId>
</dependency>
<dependency>
<groupId>com.tencent.nameservice</groupId>
<groupId>com.tencent.polaris</groupId>
<artifactId>router-healthy</artifactId>
</dependency>
<dependency>
<groupId>com.tencent.nameservice</groupId>
<groupId>com.tencent.polaris</groupId>
<artifactId>router-rule</artifactId>
</dependency>
<dependency>
<groupId>com.tencent.nameservice</groupId>
<groupId>com.tencent.polaris</groupId>
<artifactId>router-nearby</artifactId>
</dependency>
<dependency>
<groupId>com.tencent.nameservice</groupId>
<groupId>com.tencent.polaris</groupId>
<artifactId>router-metadata</artifactId>
</dependency>
<!--依赖负载均衡插件-->
<dependency>
<groupId>com.tencent.nameservice</groupId>
<groupId>com.tencent.polaris</groupId>
<artifactId>loadbalancer-random</artifactId>
</dependency>
<dependency>
<groupId>com.tencent.nameservice</groupId>
<groupId>com.tencent.polaris</groupId>
<artifactId>loadbalancer-ringhash</artifactId>
</dependency>
<!-- Polaris dependencies end -->

Loading…
Cancel
Save