Skip to content

Instantly share code, notes, and snippets.

@weidongxu-microsoft
Created January 7, 2026 03:52
Show Gist options
  • Select an option

  • Save weidongxu-microsoft/9c9fdc931610d8da1c53597261e1762a to your computer and use it in GitHub Desktop.

Select an option

Save weidongxu-microsoft/9c9fdc931610d8da1c53597261e1762a to your computer and use it in GitHub Desktop.
Migration Guide

Migration Guide

Assumption

  • Project is Maven.
  • Java code is on JDK 8 or above.

Migrate pom.xml

It is recommended to use azure-sdk-bom (version higher than 1.3.0).

Example of pom.xml

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.azure</groupId>
                <artifactId>azure-sdk-bom</artifactId>
                <version>1.3.3</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>com.azure</groupId>
            <artifactId>azure-identity</artifactId>
        </dependency>
        <dependency>
            <groupId>com.azure.resourcemanager</groupId>
            <artifactId>azure-resourcemanager</artifactId>
        </dependency>
    </dependencies>

Migrate Java Code

  • Reference for update Java code
  • Make a list of Java files that contains com.microsoft.azure package. Migrate each of them.
  • Do not modify package name in file.
  • Keep Azure resource and operation exactly same. The property on the Azure resource should not be changed, for "improvement" or "modernization". The focus here is to use the new libaray to create the exactly same Azure resource, apply the exactly same operation on it.
  • If there is test in the project, Java code there also need to be updated.

Validation

Make sure the migrated project compile pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment