Skip to content

Maven — Developer Guide

Setup

Generate Access Token

  1. Visit maven.registry.hochguertel.work
  2. Login with admin credentials
  3. Navigate to Settings → Access Tokens
  4. Create a new token with appropriate permissions

Maven Configuration

Add to ~/.m2/settings.xml:

xml
<settings>
  <servers>
    <server>
      <id>hochguertel-releases</id>
      <username>your-user</username>
      <password>your-access-token</password>
    </server>
    <server>
      <id>hochguertel-snapshots</id>
      <username>your-user</username>
      <password>your-access-token</password>
    </server>
  </servers>
</settings>

Download Dependencies

Add to your pom.xml:

xml
<repositories>
  <repository>
    <id>hochguertel-releases</id>
    <url>https://maven.registry.hochguertel.work/releases</url>
    <releases><enabled>true</enabled></releases>
    <snapshots><enabled>false</enabled></snapshots>
  </repository>
  <repository>
    <id>hochguertel-snapshots</id>
    <url>https://maven.registry.hochguertel.work/snapshots</url>
    <releases><enabled>false</enabled></releases>
    <snapshots><enabled>true</enabled></snapshots>
  </repository>
</repositories>

Publish Artifacts

Add to your pom.xml:

xml
<distributionManagement>
  <repository>
    <id>hochguertel-releases</id>
    <url>https://maven.registry.hochguertel.work/releases</url>
  </repository>
  <snapshotRepository>
    <id>hochguertel-snapshots</id>
    <url>https://maven.registry.hochguertel.work/snapshots</url>
  </snapshotRepository>
</distributionManagement>

Then deploy:

bash
mvn deploy

Gradle (Kotlin DSL)

kotlin
// build.gradle.kts
publishing {
    repositories {
        maven {
            name = "hochguertel"
            url = uri("https://maven.registry.hochguertel.work/releases")
            credentials {
                username = project.findProperty("repoUser") as String? ?: ""
                password = project.findProperty("repoToken") as String? ?: ""
            }
        }
    }
}

Set credentials in ~/.gradle/gradle.properties:

properties
repoUser=your-user
repoToken=your-access-token

hochguertel.work Registry Platform