当前位置: 首页 > 文档资料 > Apus 中文文档 >

1.2.1 获取 SDK

优质
小牛编辑
127浏览
2023-12-01

以下配置均在 pom.xml 中完成

1. 配置 Nexus 仓库

<project>
    ...
    <repositories>
        <repository>
            <id>EcoCloud</id>
            <name>EcoCloud Repository</name>
            <url>http://nexus.cloud.mi.com/content/groups/public/</url>
            <snapshots><enabled>true</enabled></snapshots>
        </repository>
    </repositories>
    ...
</project>

2. 要实现 server,必须的依赖是:

<project>
    ...
    <dependencies>
        ...
        <dependency>
            <groupId>com.xiaomi</groupId>
            <artifactId>apus-server</artifactId>
            <version>1.0.0-ecology</version>
        </dependency>
        <dependency>
            <groupId>com.xiaomi</groupId>
            <artifactId>apus-registry-servicecenter</artifactId>
            <version>1.0.0-ecology</version>
        </dependency>
        ...
    </dependencies>
    ...
</project>

3. 要实现 client,必须的依赖是:

<project>
    ...
    <dependencies>
        ...
        <dependency>
            <groupId>com.xiaomi</groupId>
            <artifactId>apus-client</artifactId>
            <version>1.0.0-ecology</version>
        </dependency>
        <dependency>
            <groupId>com.xiaomi</groupId>
            <artifactId>apus-registry-servicecenter</artifactId>
            <version>1.0.0-ecology</version>
        </dependency>
        ...
    </dependencies>
    ...
</project>