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:
Go to artifex.soh.gg and sign in.
Click New repository.
In the Name field, enter a display name, such as
Libraries.In the Repository name field, enter the identifier that appears in the Maven repository URL, such as
libs.Under Visibility, select Private or Public.
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:
In Artifex, go to Tokens.
Click New token.
In the Name field, enter
CIor the name of the machine that uses it.In the Expires list, select an expiry.
For Access, select Write.
For Repositories, select Only these repositories, and then select the repository.
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 deployWith 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_TOKENkotlin
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 publishAllPublicationsToArtifexRepositoryFor 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
- To let the repository serve dependencies from other repositories as well, see Upstream repositories.
- To share the repository with other people, see Share a repository.
- To see what you deployed, see Browse a repository.