The project structure released to Maven Central should be
myproject-0.0.1.pom
myproject-0.0.1.jar
myproject-0.0.1-sources.jar
myproject-0.0.1-javadoc.jar
This plugin aims to provide integration with Maven release plugin and to bundle these artifacts in azuresdkpartnerdrops storage account.
- Request access to the Azure SDK Partners security group.
- Follow this documentation to find the access key to storage account
azuresdkpartnerdropsin the key vault. - Add this snippet to your maven settings.xml:
<server>
<id>azuresdkpartnerdrops</id>
<username>azuresdkpartnerdrops</username>
<password>${access key from the key vault secret}</password>
</server>- Add
bundler.propertiesto your project:
team=storage
product=asyncv10
exclude=.*-tests.jar,azure-samples.*where exclude is a comma separated string containing exact matches or regex matches of built files to exclude from publishing to Maven. You can also provide these on the commandline arguments documented below.
- Commit your changes and make sure your local Git repo is clean. Then run
mvn com.microsoft.azure:bundler-maven-plugin:autoif you want to release the version as is defined in pom.xml, or
mvn com.microsoft.azure:bundler-maven-plugin:auto -Dversion={release-version} -DdevVersion={next-dev-version}if your version has -SNAPSHOT and you want the bundler to run maven release plugin for you.
- The previous job will print the
blobPathin the console. Paste that into the azuresdkpartners to maven pipeline and start the job.
The individual goals are listed below.
To prepare the release for a SNAPSHOT project with 2 maven release plugin commits, run
mvn com.microsoft.azure:bundler-maven-plugin:prepareArgument properties must be appended in -Dargument=value format.
| Property | Description |
|---|---|
version |
Required if versionConfig is not provided. All modules in the project will have this release version. |
devVersion |
Required if versionConfig is not provided. All modules in the project will have this as the next development version. Usually ends with -SNAPSHOT. |
versionConfig |
Required if different child modules in this project have different versions. Must be pointing to a comma separated file in the line format of groupId,artifactId,releaseVersion,nextDevelopmentVersion. |
Examples:
mvn com.microsoft.azure:bundler-maven-plugin:prepare -DversionConfig=`pwd`/versionConfig.csvWill prepare the release with versions defined in versionConfig.csv and release tag v1.7.1. 2 Commits with messages "[maven-release-plugin] prepare release v1.7.1" and "[maven-release-plugin] prepare for next development iteration" will be generated.
mvn com.microsoft.azure:bundler-maven-plugin:prepare -Dversion=1.3.1 -DdevVersion=1.3.2-SNAPSHOTWill prepare the release with versions 1.3.1 and next development version 1.3.2-SNAPSHOT. Release tag will be v1.3.1. 2 Commits with messages "[maven-release-plugin] prepare release v1.3.1" and "[maven-release-plugin] prepare for next development iteration" will be generated.
Whether you are doing a snapshot release or an official Maven Central release, you can run
mvn clean source:jar javadoc:jar package -DskipTests // or your own build command
mvn com.microsoft.azure:bundler-maven-plugin:bundle -Dteam=fluent -Dproduct=network-2018-12-01Bundler will collect all the pom files and jar files and upload to azuresdkpartnerdrops storage account, excluding the files specified.
Argument properties may be appended in -Dargument=value format.
| Property | Description |
|---|---|
team |
Required. The name of the team for indexing purpose. Must be provided on the commandline or in bundler.properties. Commandline argument overrides value defined in bundler.properties. |
product |
Required. The name of the product for indexing purpose. Must be provided on the commandline or in bundler.properties. Commandline argument overrides value defined in bundler.properties. |
exclude |
Optional. A comma separated string containing exact matches or regex matches of built files to exclude from publishing to Maven. Can be provided on the commandline or in bundler.properties. Commandline argument overrides value defined in bundler.properties. |
Whether you are doing a snapshot release or an official Maven Central release, you can run
mvn com.microsoft.azure:bundler-maven-plugin:auto -Dteam=fluent -Dproduct=network-2018-12-01Bundler will run prepare, a customizable buildCmd, and then bundle.
Argument properties may be appended in -Dargument=value format.
| Property | Description |
|---|---|
team |
Required. The name of the team for indexing purpose. Must be provided on the commandline or in bundler.properties. Commandline argument overrides value defined in bundler.properties. |
product |
Required. The name of the product for indexing purpose. Must be provided on the commandline or in bundler.properties. Commandline argument overrides value defined in bundler.properties. |
exclude |
Optional. A comma separated string containing exact matches or regex matches of built files to exclude from publishing to Maven. Can be provided on the commandline or in bundler.properties. Commandline argument overrides value defined in bundler.properties. |
buildCmd |
Optional. A build command for Maven to build all the artifacts. Default value is clean source:jar javadoc:jar package -DskipTests. Can be provided on the commandline or in bundler.properties. Commandline argument overrides value defined in bundler.properties. |
Whether you are doing a snapshot release or an official Maven Central release, you can run
mvn clean source:jar javadoc:jar package -DskipTests
mvn com.microsoft.azure:bundler-maven-plugin:legacyBundleArgument properties may be appended in -Dargument=value format.
| Property | Description |
|---|---|
dest |
Optional. The output folder for bundled artifacts. Default to output directory in the command execution directory. |
To start an official release with Maven release plugin and bundle them together in one step, run legacyAuto goal. All arguments to both prepare and bundle goals are accepted. Between prepare and bundle, this command will checkout the release commit (through git checkout HEAD~1) and reset to head (through git checkout -) after bundling. Goal prepare will only be run for SNAPSHOT projects.
For developers publishing to group IDs com.microsoft.azure or com.microsoft.rest, this goal is connected to the Jenkins server https://azuresdkci.cloudapp.net/ to easily run staging jobs. You will be prompted to enter your Jenkins user ID and API token, which can be fetched here: http://azuresdkci.cloudapp.net/me/configure.
mvn com.microsoft.azure:bundler-maven-plugin:stageArgument properties must be appended in -Dargument=value format.
| Property | Description |
|---|---|
source |
Required. The source network location where artifacts are. |
groupId |
Required. The group ID, starting with either com.microsoft.azure or com.microsoft.rest. |
Examples:
mvn com.microsoft.azure:bundler-maven-plugin:stage -Dsource=\\\\scratch2\\scratch\\jianghlu\\release-100 -DgroupId=com.microsoft.azureWill run the Jenkins job with location parameter set to \\scratch2\scratch\jianghlu\release-100\.
Ideally we should be able to run stage goal without the dependency on Jenkins.
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.