Introducing Matrix Parameters
Matrix parameters key-value pairs parameters separated by a semicolon (;) that you can place anywhere on a URI.
This is a standard method for specifying parameters in HTTP (in addition to querying parameters and path parameters).
Artifactory makes use of matrix parameters for:
Dynamically Adding Properties to Artifacts on Deployment
You can add key-value matrix parameters to deploy (PUT) requests and those are automatically transformed to properties on the deployed artifact.
Since matrix parameters can be added on any part of the URL, not just at the end, you can add them to the target deployment base URL. At the time of deployment, the artifact path is added after the matrix parameters and the final deployed artifact will be assigned the defined properties.
You can even use dynamic properties, depending on our deployment framework.
When using Maven, for instance, you can add two parameters to the deployment URL:
And deploy to the
Upon deployment the URL is transformed to:
And the deployed
Controlling Artifact Resolution with Matrix Parameters Queries
Matrix parameters can also be used in artifact resolution, to control how artifacts are found and served.
There is currently support for two types of queries:
Resolved artifacts may either have no property with the key specified, or have the property with the key specified and the exact value specified (i.e. the artifact is resolved if it has a property with a non-conflicting value).
Non-mandatory properties are identified by a simple
Resolved artifacts must have a property with the key specified and the exact value specified.
Mandatory properties are identified with a plus sign (+) after the property key:
Multi-valued Properties Support
All matrix parameters can support multiple values by separating values with a comma (,). For example: