1

It's specified in this page https://github.com/Azure/azure-sdk-for-java,

Java 8 or later is required to use libraries under the com.azure package, for libraries under the com.microsoft.azure package Java 7 or later is required.

Does that mean I should add dependencies like

    <dependency>
      <groupId>com.azure</groupId>
      <artifactId>azure</artifactId>
      <version>1.31.1</version>
    </dependency>

Not <groupId>com.microsoft.azure</groupId> anymore?

Well, I downloaded this sample, https://github.com/Azure-Samples/Hybrid-resources-java-manage-resource-group.git, and changed all com.microsoft.azure to com.azure, but it did not work...

Bomin
  • 1,619
  • 5
  • 24
  • 39

2 Answers2

0

The azure artifact is part of com.microsoft.azure group. So, you should continue to use this group. See https://search.maven.org/artifact/com.microsoft.azure/azure/1.31.1/jar

<dependency>
  <groupId>com.microsoft.azure</groupId>
  <artifactId>azure</artifactId>
  <version>1.31.1</version>
</dependency>

The new packages released under com.azure group follow new design guidelines.

You can find more details on all available packages (old and new) here.

Available packages

Each service might have a number of libraries available from each of the following categories:

  • Client: New Releases
  • Client: Previous Versions
  • Management: New Releases
  • Management: Previous Versions

Client: New Releases

New wave of packages that 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 folder, package, and namespaces names starting with azure-, e.g. azure-keyvault.

You can find the most up to date list of all of the new packages on our page. This list includes the most recent releases: both GA and preview.

NOTE: If you need to ensure your code is ready for production use one of the stable, non-preview libraries.

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 new libraries, as they allow you to use and consume existing resources and interact with them, for example: upload a blob. Previous 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 new releases. They do however offer wider coverage of services.

Management: New Releases A new set of management libraries that follow the [Azure SDK Design Guidelines for

Java](https://azure.github.io/azure-sdk/java/guidelines/) are now in Public Preview. These new libraries provide a higher-level, object-oriented API for managing Azure resources, that is optimized for ease of use, succinctness and consistency. You can find the list of new packages on this page . Documentation and code samples for these new libraries can be found here

NOTE: If you need to ensure your code is ready for production use one of the stable, non-preview libraries.

Management: Previous Versions For a complete list of management libraries which enable you to provision and manage Azure resources,

please check here. They might not have the same feature set as the new releases but they do offer wider coverage of services. Management libraries can be identified by namespaces that start with azure-mgmt-, e.g. azure-mgmt-compute

For a full list of all Azure SDK releases, check this page.

srikanta
  • 2,914
  • 3
  • 21
  • 35
0

Please check this section on Java releases.

Note that the newer version of com.azure.resourcemanager:azure:azure-resourcemanager is still in preview stage. You do not want to take it into your production system, yet.

If you do not intend to use resourcemanager lib with other com.azure libs, you can safely continue using com.microsoft.azure:azure until above get GAed.

weidongxu
  • 303
  • 1
  • 7