User Guide
  • Fundamentals
    • Quick Start Guide
      • Signing Up
      • Package Discovery
        • Connecting to GitHub
        • Connecting to GitLab
        • Connecting to Azure DevOps
        • Connecting to the CI Pipeline
        • Connecting to the Artifact Server
      • Package Sealing
        • Integrating the CLI in the CI
        • Editing Dependencies
    • Deployments
      • Choosing Your Deployment
      • Automatic Remediation
      • Remote Configuration
      • Local Configuration
      • Artifact Server
    • CLI
      • Download and Installation
      • Scanning
      • Fixing All Dependencies
      • Fixing Specific Dependencies
      • Fixing OS Vulnerabilities
      • Integrating with the CI
      • Uploading Scan Results
      • Commands
      • SCA Integrations
      • JFrog Integration
      • Usage Examples
        • Sealing Application Dependencies
        • Sealing Linux Environments
    • Artifact Server
      • Generating a Token
      • Artifact Server Ordering
      • Configuring the Package Manager
        • Configuring apk
        • Configuring Composer
        • Configuring Go
        • Configuring Gradle
        • Configuring Maven
        • Configuring npm
        • Configuring pip
        • Configuring Poetry
        • Configuring yarn
        • Configuring yum
      • Clearing the Cache
      • Editing Your Dependencies
    • Web Interface
      • Rules Screen
  • APIs
    • List Vulnerable Packages
  • FAQ
  • Vulnerability Disclosure
Powered by GitBook
On this page
  • Pull directly from the artifact server
  • Pull through JFrog's Artifactory
  1. Fundamentals
  2. Artifact Server
  3. Configuring the Package Manager

Configuring Maven

How to configure the Maven package manager

This page explains how to configure the Maven package manager to pull packages from the Seal artifact server based on your existing setup.

Make sure you have the access token for the server ready.

Pull directly from the artifact server

  1. Open the project's pom.xml file.

  2. If there's no <repositories> tag then create one.

  3. Add to the <repositories> tag the Seal Security repository as the first one, as in the following example:

<repositories>
  <repository>
    <id>seal</id>
    <url>https://maven.sealsecurity.io/</url>
  </repository>
</repositories>
  1. Open the Maven settings file, usually located in ~/.m2/settings.xml in unix-based systems, and %userprofile%\.m2\settings.xml in Windows.

  2. Add a <server> section to the settings file. Note that the <id> value must be the same as the value provided in the pom.xml:

<settings>
  <servers>
    <server>
      <id>seal</id>
      <username>${env.PROJECT_ID}</username>
      <password>${env.SEAL_TOKEN}</password>
    </server>
  </servers>
</settings>
  1. Build your project, setting your token to the artifact server in the SEAL_TOKEN environment variable, and putting the project's ID in the PROJECT_ID .

PROJECT_ID=my_project SEAL_TOKEN=<TOKEN> mvn package

Pull through JFrog's Artifactory

  1. Go to JFrog's Artifactory configuration and create a new remote Maven repository.

    1. In the Basic configuration, use seal-mvn as your Repository Key.

    2. In both the URL field set https://maven.sealsecurity.io.

    3. In the User Name field use jfrog.

    4. In the Password / Access Token field paste the Production token you created earlier.

  2. Turn off the Handle Snapshots option.

  3. Save the new repository, and set it as the top priority remote repository in the virtual repository you're using.

PreviousConfiguring GradleNextConfiguring npm

Last updated 3 months ago