Filtered Resources

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide

Note

The Filtered Resources setting requires a Pro license.

You can designate any textual file artifact as a filtered resource to process any textual file artifact as a FreeMarker template before download. JFrog Artifactory applies its own APIs to the filtering context, allowing you to create and provision dynamic content based on information stored in Artifactory. With filtered resources, a single artifact can be downloaded with content tailored to the specific context of the download request.

For example, you can provision different content based on an originating IP address or based on changing property values attached to the artifact.

Artifactory provides the following environment variables for the FreeMarker template:

  • "properties" (org.artifactory.md.Properties): Contains the properties of the requested artifact and any matrix params included in the request. When a clash of properties with identical keys occurs, the former takes precedence.

  • "request" (org.artifactory.request.Request): The current request that was sent for the artifact.

  • "security" (org.artifactory.security.Security): Artifactory's current security object.