建议使用以下浏览器,以获得最佳体验。 IE 9.0+以上版本 Chrome 31+ 谷歌浏览器 Firefox 30+ 火狐浏览器
请选择 进入手机版 | 继续访问电脑版
设置昵称

在此一键设置昵称,即可参与社区互动!

确定
我再想想
选择版块

Serverless...

发帖: 230粉丝: 2

级别 : 版主

Rank: 7Rank: 7Rank: 7

发消息 + 关注

发表于2019-1-15 16:09:24 1415 2 楼主 显示全部楼层
[技术交流] CSE Java SDK包名切换指导

背景信息

CSE Java SDK的开源部分ServiceComb项目已于2017年12月全票通过进入Apache孵化器,根据Apache软件基金会要求,项目groupId统一由io.servicecomb调整为org.apache.servicecomb。

CSE Java SDK作为ServiceComb的商业版本,除提供对接华为公有云的能力、安全、分布式数据一致性等商业能力外,其大部分组件来自于开源的ServiceComb。因此提供本指导用于支持客户顺利升级至包名变更后的CSE Java SDK版本(2.3.3+)。

更改说明

CSE Java SDK版本(2.3.3+)中涉及包名变化情况如下:

序号

包名称

groupId(修改前)

groupId(修改后)

变化类型

1

CSE Java-SDK开源包

65个包名变更,详见CSE Java SDK开源包列表

io.servicecomb

org.apache.servicecomb

修改

2

CSE Java-SDK开源包foundation-config-cc

新增config-cc,groupId为org.apache.servicecomb

新增

3

CSE Java-SDK商业包foundation-config-cc

移除foundation-config-cc

删除

4

CSE Java-SDK商业包

共计13个,详见CSE Java SDK商业包列表

com.huawei.paas.cse

无变化

操作步骤

  1. 通过配置maven setting文件以获取SDK依赖。

    profiles中增加如下配置。

    <profile>
        <id>nexusProfile</id>
        <repositories>
            <repository>
                <id>cse1</id>
                <url>http://maven.huaweicse.com/nexus/content/groups/public/</url>
            </repository>
        </repositories>
    </profile>

    新增activeProfiles配置。

    <activeProfiles>
        <activeProfile>nexusProfile</activeProfile>
    </activeProfiles>
  2. 引入dependencyManagement,建议开发者在pom.xml中进行如下配置以便更好的管理三方件。

  3.  说明:

    版本使用2.3.3以上版本。

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.huawei.paas.cse</groupId>
                <artifactId>cse-dependency</artifactId>
                <version>2.3.58</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>


  4. 修改pom.xml中依赖包的groupid。


  5. 此处仅以引入对spring-boot-starter-provider、cse-solution-service-engine、foundation-auth的依赖为例。

    • 修改前

    <dependency>
        <groupId>io.servicecomb</groupId>
        <artifactId>spring-boot-starter-provider</artifactId>
    </dependency>
    <dependency>
        <groupId>com.huawei.paas.cse</groupId>
        <artifactId>cse-solution-service-engine</artifactId>
    </dependency>
    <dependency>
        <groupId>com.huawei.paas.cse</groupId>
        <artifactId>foundation-auth</artifactId>
        <exclusions>
            <exclusion>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-log4j12</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    • 修改后

    <dependency>
        <groupId>org.apache.servicecomb</groupId>
        <artifactId>spring-boot-starter-provider</artifactId>
    </dependency>
    <dependency>
        <groupId>com.huawei.paas.cse</groupId>
        <artifactId>cse-solution-service-engine</artifactId>
    </dependency>
    <dependency>
        <groupId>com.huawei.paas.cse</groupId>
        <artifactId>foundation-auth</artifactId>
        <exclusions>
            <exclusion>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-log4j12</artifactId>
            </exclusion>
        </exclusions>
    </dependency>


CSE Java SDK开源包列表

序号

artifactId

groupid(修改前)

groupid(修改后)

1

common-javassist

io.servicecomb

org.apache.servicecomb

2

common-protobuf

io.servicecomb

org.apache.servicecomb

3

common-rest

io.servicecomb

org.apache.servicecomb

4

common

io.servicecomb

org.apache.servicecomb

5

config-apollo

io.servicecomb

org.apache.servicecomb

6

dynamic-config

io.servicecomb

org.apache.servicecomb

7

edge-core

io.servicecomb

org.apache.servicecomb

8

edge

io.servicecomb

org.apache.servicecomb

9

foundation-common

io.servicecomb

org.apache.servicecomb

10

config-cc

io.servicecomb

org.apache.servicecomb

11

foundation-config

io.servicecomb

org.apache.servicecomb

12

foundation-metrics

io.servicecomb

org.apache.servicecomb

13

foundation-ssl

io.servicecomb

org.apache.servicecomb

14

foundation-test-scaffolding

io.servicecomb

org.apache.servicecomb

15

foundation-vertx

io.servicecomb

org.apache.servicecomb

16

foundations

io.servicecomb

org.apache.servicecomb

17

handler-bizkeeper

io.servicecomb

org.apache.servicecomb

18

handler-flowcontrol-qps

io.servicecomb

org.apache.servicecomb

19

handler-loadbalance

io.servicecomb

org.apache.servicecomb

20

handler-publickey-auth

io.servicecomb

org.apache.servicecomb

21

handler-tracing-zipkin

io.servicecomb

org.apache.servicecomb

22

handlers

io.servicecomb

org.apache.servicecomb

23

java-chassis-core

io.servicecomb

org.apache.servicecomb

24

java-chassis-dependencies

io.servicecomb

org.apache.servicecomb

25

java-chassis-parent

io.servicecomb

org.apache.servicecomb

26

java-chassis

io.servicecomb

org.apache.servicecomb

27

metrics-common

io.servicecomb

org.apache.servicecomb

28

metrics-core

io.servicecomb

org.apache.servicecomb

29

metrics-extension

io.servicecomb

org.apache.servicecomb

30

metrics-integration

io.servicecomb

org.apache.servicecomb

31

metrics-prometheus

io.servicecomb

org.apache.servicecomb

32

metrics

io.servicecomb

org.apache.servicecomb

33

provider-jaxrs

io.servicecomb

org.apache.servicecomb

34

provider-pojo

io.servicecomb

org.apache.servicecomb

35

provider-rest-common

io.servicecomb

org.apache.servicecomb

36

provider-springmvc

io.servicecomb

org.apache.servicecomb

37

providers

io.servicecomb

org.apache.servicecomb

38

service-registry

io.servicecomb

org.apache.servicecomb

39

spring-boot-starter-configuration

io.servicecomb

org.apache.servicecomb

40

spring-boot-starter-discovery

io.servicecomb

org.apache.servicecomb

41

spring-boot-starter-parent

io.servicecomb

org.apache.servicecomb

42

spring-boot-starter-provider

io.servicecomb

org.apache.servicecomb

43

spring-boot-starter-registry

io.servicecomb

org.apache.servicecomb

44

spring-boot-starter-servicecomb

io.servicecomb

org.apache.servicecomb

45

spring-boot-starter-transport

io.servicecomb

org.apache.servicecomb

46

spring-cloud-zuul-zipkin

io.servicecomb

org.apache.servicecomb

47

spring-cloud-zuul

io.servicecomb

org.apache.servicecomb

48

swagger-generator-core

io.servicecomb

org.apache.servicecomb

49

swagger-generator-jaxrs

io.servicecomb

org.apache.servicecomb

50

swagger-generator-springmvc

io.servicecomb

org.apache.servicecomb

51

swagger-generator

io.servicecomb

org.apache.servicecomb

52

swagger-invocation-core

io.servicecomb

org.apache.servicecomb

53

swagger-invocation-jaxrs

io.servicecomb

org.apache.servicecomb

54

swagger-invocation-springmvc

io.servicecomb

org.apache.servicecomb

55

swagger-invocation

io.servicecomb

org.apache.servicecomb

56

swagger

io.servicecomb

org.apache.servicecomb

57

tracing-common

io.servicecomb

org.apache.servicecomb

58

tracing-zipkin

io.servicecomb

org.apache.servicecomb

59

tracing

io.servicecomb

org.apache.servicecomb

60

transport-highway

io.servicecomb

org.apache.servicecomb

61

transport-rest-client

io.servicecomb

org.apache.servicecomb

62

transport-rest-servlet

io.servicecomb

org.apache.servicecomb

63

transport-rest-vertx

io.servicecomb

org.apache.servicecomb

64

transport-rest

io.servicecomb

org.apache.servicecomb

65

transports

io.servicecomb

org.apache.servicecomb


CSE Java SDK商业包列表

增删说明

序号

artifactId

groupid(不涉及修改)

1

foundation-config-cc

已迁移至ServiceComb

CSE Java-SDK商业包列表

序号

artifactId

groupid(不涉及修改)

1

cse-adapter-springmvc

com.huawei.paas.cse

2

cse-dependency

com.huawei.paas.cse

3

cse-handler-2pc

com.huawei.paas.cse

4

cse-handler-cloud-extension

com.huawei.paas.cse

5

cse-handler-performance-stats

com.huawei.paas.cse

6

cse-handler-tcc

com.huawei.paas.cse

7

cse-handler-tracing-apm

com.huawei.paas.cse

8

cse-handler-tracing

com.huawei.paas.cse

9

cse-narayana

com.huawei.paas.cse

10

cse-solution-service-engine

com.huawei.paas.cse

11

cse-solutions

com.huawei.paas.cse

12

foundation-auth

com.huawei.paas.cse

13

paas-cse

com.huawei.paas.cse


回复 举报
分享

分享文章到朋友圈

分享文章到微博

林Saber

发帖: 0粉丝: 0

级别 : 新手上路

Rank: 1

发消息 + 关注

发表于2019-3-6 20:37:17 沙发 显示全部楼层

导入sdk依赖,需要在本地maven setting文件设置华为云的镜像吗?

点赞 回复 举报

liubao68

发帖: 104粉丝: 9

级别 : 版主

Rank: 7Rank: 7Rank: 7

发消息 + 关注

发表于2019-3-11 15:55:49 板凳 显示全部楼层

需要配置maven仓库地址,参考:  https://huaweicse.github.io/cse-java-chassis-doc/


点赞 回复 举报

游客

您需要登录后才可以回帖 登录 | 立即注册