Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Section
Column
width75

Overview

Excerpt

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.

Maven is configured using a 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
Newtablink
TextApache Maven Project Settings Reference
URLhttps://maven.apache.org/settings.html
.

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:

  1. Resolve artifacts through Artifactory
  2. Deploy artifacts to repositories through Artifactory

Once your Maven build is configured, Artifactory also provides tight integration with commonly used CI servers (such as JenkinsTeamCity or a Bamboo) through a set of plugins that you can freely install and use.

Column
Panel
titlePage Contents

Table of Contents
maxLevel4
minLevel2
 

Panel
titleRead more

Children Display
 

Panel
titleIntegration Benefits

Newtablink
TextJFrog Artifactory and Maven Repositories
URLhttps://jfrog.com/integration/maven-repository/

JFrog Artifactory and Maven Repositories123

 

HTML
<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.

Section
Column
width50%

Maven Metadata View

Maven XML View

Column

POM View

Maven POM 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.

Section
Column
width50

Releases

The repository from which to resolve releases

Snapshots

The repository from which to resolve snapshots

Plugin Releases

The repository from which to resolve plugin releases

Plugin Snapshots

The repository from which to resolve plugin snapshots

Mirror Any

When set, you can select a repository that should mirror any other repository. For more details please refer to Additional Mirror Any Setup

Maven Settings Generator

Once you have configured the settings for Maven you can click "Generate Settings" to generate and save the settings.xml file.

...