https://github.com/jfrog/artifactory-maven-plugin
A Maven plugin to resolve artifacts from Artifactory, deploy artifacts to Artifactory, capture and publish build info.
https://github.com/jfrog/artifactory-maven-plugin
artifactory java jfrog maven
Last synced: 2 months ago
JSON representation
A Maven plugin to resolve artifacts from Artifactory, deploy artifacts to Artifactory, capture and publish build info.
- Host: GitHub
- URL: https://github.com/jfrog/artifactory-maven-plugin
- Owner: jfrog
- License: apache-2.0
- Created: 2020-09-10T15:29:20.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2026-01-31T06:58:41.000Z (3 months ago)
- Last Synced: 2026-01-31T20:34:49.502Z (3 months ago)
- Topics: artifactory, java, jfrog, maven
- Language: Java
- Homepage: https://www.jfrog.com/confluence/display/JFROG/Maven+Artifactory+Plugin
- Size: 185 KB
- Stars: 27
- Watchers: 7
- Forks: 38
- Open Issues: 38
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Maven Artifactory Plugin
[](https://github.com/jfrog/artifactory-maven-plugin/actions?query=workflow%3ATest)
# Table of Contents
- [Overview](#overview)
- [Using the Maven Artifactory plugin](#using-maven-artifactory-plugin)
- [Basic Configuration](#basic-configuration)
- [Full Configuration](#full-configuration)
- [Configuration Details](#configuration-details)
- [Reading Environment Variables and System Properties](#reading-environment-variables-and-system-properties)
- [Example](#example)
- [Contribution](#-contributions)
## Overview
The Maven Artifactory integrates in your build to allow you to do the following:
1. Resolve artifacts from Artifactory.
2. Capture the full build information and publish it to Artifactory.
3. Deploy all build Artifacts to Artifactory.
## Using Maven Artifactory plugin
The Maven Artifactory Plugin coordinates are org.jfrog.buildinfo:artifactory-maven-plugin:x.x.x.
It can be viewed
on [releases.jfrog.io](https://releases.jfrog.io/artifactory/oss-release-local/org/jfrog/buildinfo/artifactory-maven-plugin).
### Basic Configuration
A typical build plugin configuration would be as follows:
```xml
org.jfrog.buildinfo
artifactory-maven-plugin
3.6.1
build-info
publish
awesome
qa
https://acme.jfrog.io
deployer
dontellanyone
libs-release-local
libs-snapshot-local
```
The plugin's invocation phase is validate by default and we recommend you don't change it so the plugin is called as
early as possible in the lifecycle of your
Maven build.
### Full Configuration
The example above configures the Artifactory publisher, to deploy build artifacts either to the releases or the
snapshots repository of Artifactory when `mvn deploy` is executed.
However, the Maven Artifactory Plugin provides many other configurations:
```xml
true
*password*,*secret*,*key*,*token*,*passphrase*
*os*
60
..
..
plugin-demo
${buildnumber}
https://build-url.org
..
N
N
..
..
awesome
http://localhost:8081/artifactory
${username}
${password}
*-tests.jar
libs-release-local
libs-snapshot-local
true/false
true/false
..
..
true/false
true/false
10
proxy.jfrog.io
8888
proxyUser
proxyPassword
```
### Configuration Details
| Configuration | Description |
|:--------------------:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `` | Specifies properties you can attach to published artifacts. For example: prop-value. |
| `` | Specifies whether environment variables are published as part of BuildInfo metadata and which include or exclude patterns are applied when variables are collected |
| `` | Defines an Artifactory repository where build artifacts should be published using a combination of a `` and `/`. Build artifacts are deployed if the deploy goal is executed and only after all modules are built. |
| `` | Updates BuildInfo metadata published together with build artifacts. You can configure whether or not BuildInfo metadata is published using the configuration. |
| `` | Specifies HTTP/S proxy. |
### Reading Environment Variables and System Properties
Every build server provides its own set of environment variables. You can utilize these variables when configuring the
plugin as shown in the following example:
```xml
{{ARTIFACTORY_CONTEXT_URL|"https://acme.jfrog.io"}}
{{DRONE_BUILD_NUMBER|TRAVIS_BUILD_NUMBER|CI_BUILD_NUMBER|BUILD_NUMBER|"333"}}
{{DRONE_BUILD_URL|CI_BUILD_URL|BUILD_URL}}
```
Any plugin configuration value can contain several {{ .. }} expressions. Each expression can contain a single or
multiple environment variables or system properties to be used.
The expression syntax allows you to provide enough variables to accommodate any build server requirements according to
the following rules:
* Each expression can contain several variables, separated by a ' | ' character to be used with a configuration value.
* The last value in a list is the default that will be used if none of the previous variables is available as an
environment variable or a system property.
For example, for the expression {{V1|V2|"defaultValue"}} the plugin will attempt to locate environment variable V1 ,
then system property V1, then environment variable or system property V2 , and if none of these is available,
"defaultValue" will be used.
If the last value is not a string (as denoted by the quotation marks) and the variable cannot be resolved, null will be
used (For example, for expression {{V1|V2}} where neither V1 nor V2 can be resolved).
### Example
The following project provides a working example of using the plugin:
[Maven Artifactory Plugin Example](https://github.com/JFrog/project-examples/tree/master/artifactory-maven-plugin-example).
## 💻 Contributions
We welcome pull requests from the community. To help us improve this project, please read
our [Contribution](./CONTRIBUTING.md#-guidelines) guide.