2
votes

I am very confused about using Azure Java SDK.

Firstly, I found and started using https://mvnrepository.com/artifact/com.microsoft.azure/azure version 1.31.1.

I have been using this for a while but today my CI software failed to build my project:

Failed to collect dependencies at com.microsoft.azure:azure:jar:1.31.1 -> com.microsoft.azure:azure-client-authentication:jar:1.7.0 -> com.microsoft.azure:adal4j:jar:1.6.4 -> com.nimbusds:oauth2-oidc-sdk:jar:6.5 -> net.minidev:json-smart:jar:2.3-SNAPSHOT: Failed to read artifact descriptor for net.minidev:json-smart:jar:2.3-SNAPSHOT: Could not find artifact net.minidev:minidev-parent:pom:2.3-20170326.024654-2 in jfrog (http://url/maven-public) -> [Help 1]

Now, I can't find net.minidev:minidev-parent:pom:2.3-20170326.024654-2 anywhere, and why would thesdk have a SNAPSHOT dependency?

Then I followed https://azure.github.io/azure-sdk/releases/2020-03/java.html and saw a whole lot of different libraries.

What's the deal with Azure SDK for Java? How should I actually use it?

1

1 Answers

-1
votes

This is well explained in its Github page

1. Management Libraries

Libraries which enable you to provision specific resources. They are responsible for directly mirroring and consuming Azure service's REST endpoints. Management library directories contain -mgmt-, e.g. azure-mgmt-keyvault.

2. Client: GA March 2020 Releases

New wave of packages that were released in March 2020 client library as General Availability (GA) and several others that were released in beta. These libraries follow the Azure SDK Design Guidelines for Java and share a number of core features such as HTTP retries, logging, transport protocols, authentication protocols, etc, so that once you learn how to use these features in one client library, you will know how to use them in other client libraries. You can learn about these shared features here.

These libraries can be easily identified by sdk/ folder, package, and namespaces names starting with azure-, e.g. azure-keyvault.

3. Client: Previous Versions

Last stable versions of packages that have been provided for usage with Azure and are production-ready. These libraries provide similar functionalities to the preview libraries, as they allow you to use and consume existing resources and interact with them, for example: upload a blob. Stable library directories start with microsoft-azure-, e.g. microsoft-azure-keyvault. They might not implement the guidelines or have the same feature set as the GA releases. They do however offer wider coverage of services.


Suggestion

If you want to manage Azure resources, use Management Libraries which contain -mgmt-.

If you want to utilize Azure resources, use the new-version GA Client Libraries for new features and better support. The most official documentation has turned to use new GA version now.