MicrosoftAzureBlobStorage is a low-cost option to store your Maven or other binary artifacts. It’s an alternative to feature-rich Maven repository managers like Nexus, Artifactory when you don’t have the resources to install and maintain a server with the required software or the budget to subscribe to a hosted plan.
A choice I wouldn’t recommend is to store your artifacts in the SCM.
This tutorial covers configuring Maven and setting up the AzureBlobStorage components to deploy your Java artifacts to.
After validation and creation, you should now have a StorageAccount.
2.2. CREATE STORAGE ACCOUNT CONTAINERS
Browse to the Account’s Containers.
Click on the + Container button to create the snapshotContainer.
Repeat the previous step to create the releaseContainer.
3. CONFIGURING MAVEN AND APPLICATION TO BE DEPLOYED TO A STORAGE CONTAINER
Include these updates on the Maven and application side:
You could add these server settings in your existing ~/.m2/settings.xml or in a new file as done in this tutorial.
Warning: If you set the password to have the User secret key, please make sure this file is protected and/or the password is encrypted.
Alternatively, you could pass it via VM argument -Dazure-storage-user-secret-key=XXXX.
Hosting Java artifacts using AzureBlobStorage would be valid for a solo developer or a small team already invested in Azure. Although a better choice than checking in the resulting artifacts into the SCM, it has some limitations. You won’t be able to Search for an artifact, which is convenient when you need to find out the artifactId, groupId and version of a dependency. Another limitation is maintenance. As the snapshot folder grows overtime, you would have to manually remove older versions.
A solution to these problems could be automated when using a feature-rich Maven repository manager like Nexus or Artifactory but as mentioned in the Introduction, it would also require more effort to set it up and a running server or a subscription to a paid plan. Azure Artifacts is another alternative which I might cover in the future.