Skip to content

Maven Integration Guide

Overview

OrbitRepos supports the Maven repository layout, allowing you to host private Java artifacts and proxy public repositories like Maven Central. It handles standard coordinate parsing and checksum verification.

Prerequisites

Create a Repository

  1. Log in to OrbitRepos.
  2. Go to Repositories > Create Repository.
  3. Select Maven as the format.
  4. Name it maven-public (for proxy) or maven-releases (for hosted).
curl -u admin:admin -X POST http://localhost:8080/api/v1/repositories \
  -H "Content-Type: application/json" \
  -d '{
    "name": "maven-releases",
    "format": "maven",
    "type": "hosted"
  }'

Push / Publish Artifacts

To deploy artifacts, configure your pom.xml and settings.xml.

<distributionManagement>
  <repository>
    <id>orbitrepos</id>
    <url>http://localhost:8080/maven/maven-releases/</url>
  </repository>
</distributionManagement>
<servers>
  <server>
    <id>orbitrepos</id>
    <username>admin</username>
    <password>admin</password>
  </server>
</servers>

Run the deploy command:

mvn deploy

Pull / Install Artifacts

Add the OrbitRepos repository to your pom.xml or as a mirror in settings.xml.

<repositories>
  <repository>
    <id>orbitrepos</id>
    <url>http://localhost:8080/maven/maven-public/</url>
  </repository>
</repositories>

Proxy Setup

To proxy Maven Central: 1. Create a proxy repository named maven-central. 2. Set Remote URL to https://repo1.maven.org/maven2/. 3. Create a group repository named maven-public and add both maven-releases and maven-central to it.

Troubleshooting

Issue Cause Resolution
401 Unauthorized Missing credentials in settings.xml. Verify <server> ID matches <repository> ID.
403 Forbidden User lacks deployer role. Check RBAC settings in OrbitRepos UI.
Checksum validation failed Artifact corrupted during upload. Retry the deployment.
Connection refused OrbitRepos is down or URL is wrong. Verify localhost:8080 is reachable.

Note

OrbitRepos automatically generates and verifies SHA1, SHA256, and MD5 checksums for Maven artifacts.