Skip to main content
Version: 1.19.4

Maven Packages Repository

Publish Maven packages for your user or organization.


To work with the Maven package registry, you can use Maven or Gradle. The following examples use Maven.

Configuring the package registry

To register the package registry you first need to add your access token to the settings.xml file:

<value>token {access_token}</value>

Afterwards add the following sections to your project pom.xml file:

access_tokenYour personal access token.
ownerThe owner of the package.

Publish a package

To publish a package simply run:

mvn deploy

If you want to publish a prebuild package to the registry, you can use mvn deploy:deploy-file:

mvn deploy:deploy-file -Durl={owner}/maven -DrepositoryId=gitea -Dfile=/path/to/package.jar
ownerThe owner of the package.

You cannot publish a package if a package of the same name and version already exists. You must delete the existing package first.

Install a package

To install a Maven package from the package registry, add a new dependency to your project pom.xml file:


Afterwards run:

mvn install

Supported commands

mvn install
mvn deploy
mvn dependency:get: