> For the complete documentation index, see [llms.txt](https://docs.snyk.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snyk.io/scan-fix-and-prevent/scan-with-snyk/snyk-open-source/package-repository-integrations/artifactory-package-repository-connection-setup/artifactory-registry-for-maven.md).

# Artifactory registry for Maven

How to connect Snyk to an Artifactory registry for Maven

{% hint style="info" %}
**Snyk is rolling out a new navigation.** The steps on this page describe the classic interface. If your view looks different, visit [Navigate the Snyk Web UI](https://docs.snyk.io/navigate-the-snyk-web-ui#where-things-moved) to map these options to the new interface.
{% endhint %}

## Artifactory registry for Maven

Snyk can use custom Artifactory Package Repositories with Maven Projects.

{% hint style="info" %}
**Feature availability**\
Package repository integrations are available only with Enterprise plans. For more information, see [plans and pricing](https://snyk.io/plans/).

**Supported projects**\
The Artifactory Package Repository integration supports [Node.js](https://docs.snyk.io/supported-languages/supported-languages-list/javascript#supported-package-managers-and-package-registries) (npm and Yarn) and [Maven](https://docs.snyk.io/supported-languages/supported-languages-list/java-and-kotlin#supported-package-managers-and-package-registries) Projects. For [Improved Gradle SCM scanning](https://docs.snyk.io/supported-languages/supported-languages-list/java-and-kotlin/git-repositories-with-maven-and-gradle#improved-gradle-scm-scanning), use the Maven settings on this page.
{% endhint %}

This enables Snyk to resolve all direct and transitive dependencies of packages hosted on the custom registry and calculate a more complete, accurate dependency graph and related vulnerabilities.

Maven Projects can be configured to mirror all requests through a custom package repository, or you can specify additional repositories to use alongside Maven Central.

### Set up custom Maven package registries

If authentication is required for access to your custom registry, you must configure the Artifactory package repository integration; see [Artifactory Package Repository connection setup](/scan-fix-and-prevent/scan-with-snyk/snyk-open-source/package-repository-integrations/artifactory-package-repository-connection-setup.md).

After the integration is set up, you can configure Maven settings by navigating to **Settings** > **Languages** > **Java**.

You can choose whether to use Artifactory as a mirror or as an additional repository where your artifacts will reside. These settings will be very similar to what you have in `~/.m2/settings.xml`.

### Mirrors

<figure><img src="https://2730497224-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBJO0IZx7zB6bOkotxQP2%2Fuploads%2Fgit-blob-62d22293dec818e0473a573283505d7add70c247%2Fimage%20(244).png?alt=media" alt="Maven settings, choose Type"><figcaption><p>Maven settings, choose Type</p></figcaption></figure>

Choose a value for the Type, either **Direct** or, if you are using authentication, **Integration.**

If you are using **Direct,** you must complete the **URL**, **Repository Name,** and what it is a **Mirror Of**.

The **Mirror Of** value can either be a `*` to mirror everything, or you can type in a value, for example, `central`.

If you are using the Type **Integration**, you must choose an integration type and provide the **Repository Name** and **Mirror Of** details.

Set the **Repository Name** as whatever comes after `artifactory/` in the internal repository URL.

For example, if the URL is `http://artifactory.company.io/artifactory/libs-release` **Repository Name** should be set as `libs-release`.

### Additional repositories

Alternatively, you can configure repositories that will be used as additional locations to check for artifacts.

Repositories are configured in the same way as [Mirrors](#mirrors), but do not require **Mirror Of**.

### Test the integration <a href="#test-the-integration" id="test-the-integration"></a>

Retest a Project with private dependencies hosted in Artifactory. Ensure the dependencies appear in the Project's Dependencies tab and Snyk identifies relevant vulnerabilities.

<figure><img src="https://2730497224-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBJO0IZx7zB6bOkotxQP2%2Fuploads%2F0yXDSwwtYhYh6DLiZF4p%2Fimage.png?alt=media&amp;token=8ed145c9-5e8f-4a30-a92b-85c29631da47" alt="The Dependencies tree view of a manifest file"><figcaption><p>The Dependencies tree view of a manifest file</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.snyk.io/scan-fix-and-prevent/scan-with-snyk/snyk-open-source/package-repository-integrations/artifactory-package-repository-connection-setup/artifactory-registry-for-maven.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
