Maven is configured using a
As a Maven repository, Artifactory is both a source for artifacts needed for a build, and a target to deploy artifacts generated in the build process.
settings.xml file located under your Maven home directory (typically, this will be
/user.home/.m2/settings.xml). For more information on configuring Maven please refer to the
|Text||Apache Maven Project Settings Reference|
The default values in this file configure Maven to work with a default set of repositories used to resolve artifacts and a default set of plugins.
To work with Artifactory you need to configure Maven to perform the following two steps:
- Resolve artifacts through Artifactory
- Deploy artifacts to repositories through Artifactory
Once your Maven build is configured, Artifactory also provides tight integration with commonly used CI servers (such as Jenkins, TeamCity or a Bamboo) through a set of plugins that you can freely install and use.
JFrog Artifactory and Maven Repositories123
|Text||JFrog Artifactory and Maven Repositories|
<a href="https://jfrog.com/integration/maven-repository/" target="blank"> JFrog Artifactory and Maven Repositories456 </a>
Viewing Maven Artifacts
If you select a Maven metadata file (maven-metadata.xml) or a POM file (pom.xml) in the Tree Browser, Artifactory provides corresponding tabs allowing you to view details on the selected item.
Maven Metadata View
Resolving Artifacts through Artifactory
To configure Maven to resolve artifacts through Artifactory you need to modify the
settings.xml. You can generate one automatically, or modify it manually.
Automatically Generating Settings
To make it easy for you to configure Maven to work with Artifactory, Artifactory can automatically generate a
settings.xml file which you can save under your Maven home directory.
The definitions in the generated
settings.xml file override the default central and snapshot repositories of Maven.
In the Artifact Repository Browser of the Artifacts module, select Set Me Up. In the Set Me Up dialog, set Maven in the Tool field and click "Generate Maven Settings". You can now specify the repositories you want to configure for Maven.
|The repository from which to resolve releases|
|The repository from which to resolve snapshots|
|The repository from which to resolve plugin releases|
|The repository from which to resolve plugin snapshots|
|When set, you can select a repository that should mirror any other repository. For more details please refer to Additional Mirror Any Setup|
Once you have configured the settings for Maven you can click "Generate Settings" to generate and save the