Skip to contentSkip to content

Get started ​

This document shows you how to create a repository, deploy an artifact to it, and resolve the artifact from another build.

Before you begin ​

You need a CodeSoh account. To create one, see Create an account.

Create a repository ​

To create a repository, follow these steps:

  1. Go to artifex.soh.gg and sign in.

  2. Click New repository.

  3. In the Name field, enter a display name, such as Libraries.

  4. In the Repository name field, enter the identifier that appears in the Maven repository URL, such as libs.

  5. Under Visibility, select Private or Public.

  6. Click Create repository.

The repository page shows its Maven repository URL:

https://artifex.soh.gg/maven/OWNER/libs/

For every setting, see Repositories.

Create a token ​

Build tools authenticate with a personal access token, not with your password. You decide what the token can access when you create it.

To create one, follow these steps:

  1. In Artifex, go to Tokens.

  2. Click New token.

  3. In the Name field, enter CI or the name of the machine that uses it.

  4. In the Expires list, select an expiry.

  5. For Access, select Write.

  6. For Repositories, select Only these repositories, and then select the repository.

  7. Click Create token and copy the token. It's shown only once.

For more information, see Tokens.

Deploy ​

With Maven, put the credentials in the ~/.m2/settings.xml file and name the repository in the pom.xml file with the same id:

xml
<settings>
  <servers>
    <server>
      <id>artifex</id>
      <username>YOUR_USERNAME</username>
      <password>cs_pat_YOUR_TOKEN</password>
    </server>
  </servers>
</settings>
xml
<distributionManagement>
  <repository>
    <id>artifex</id>
    <url>https://artifex.soh.gg/maven/OWNER/libs/</url>
  </repository>
</distributionManagement>
shell
mvn deploy

With Gradle's Maven Publish Plugin, put the credentials in the ~/.gradle/gradle.properties file and add the repository to the build.gradle.kts file:

properties
artifexUsername=YOUR_USERNAME
artifexPassword=cs_pat_YOUR_TOKEN
kotlin
plugins {
    `maven-publish`
}

publishing {
    publications {
        create<MavenPublication>("maven") {
            from(components["java"])
        }
    }
    repositories {
        maven {
            name = "artifex"
            url = uri("https://artifex.soh.gg/maven/OWNER/libs/")
            credentials(PasswordCredentials::class)
        }
    }
}
shell
./gradlew publishAllPublicationsToArtifexRepository

For snapshots, the Groovy DSL, and what a deploy does, see Deploy artifacts.

Resolve ​

Add the Maven repository URL to the build that consumes the artifact, as described in Resolve dependencies. A public repository needs no credentials to read.

Where to go next ​