When you use Alibaba Cloud SDK V1.0 for Java for development, you must correctly integrate the Core SDK and SDKs of Alibaba Cloud services as dependencies. This topic describes how to configure and manage these dependencies.
Configure the SDK V1.0 for Java of an Alibaba Cloud service as a dependency
The SDK V1.0 for Java of an Alibaba Cloud service provides the request and response objects of API operations and the unmarshaller object that is used to serialize the values to be returned. In this example, Elastic Compute Service (ECS) SDK V1.0 for Java is configured as a Maven dependency. The following sample code shows the Maven dependency.
<dependencies>
<!-- ecs V1.0 SDK -->
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-ecs</artifactId>
<version>5.11.7</version>
</dependency>
</dependencies>
The SDK V1.0 for Java of an Alibaba Cloud service is named in the aliyun-java-sdk-${Service name}
format. You can also view the information about the SDK V1.0 for Java of a specific Alibaba Cloud Service in the SDK Center.
Configure the Core SDK as a dependency
The Core SDK contains the logic for HTTP-based API requests, authentication information, signature algorithms, and exception handling. We recommend that you configure the Core SDK as a Maven dependency. The following sample code shows the Maven dependency.
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-core</artifactId>
<version>[4.0.0,5.0.0)</version>
</dependency>
We recommend that you use the latest version of Core SDK. The latest version of Core SDK is an update of earlier versions and fixes vulnerabilities in the earlier versions.