Table of Contents

You should determine in your pom.xml the target repository where Maven should upload artifact. Let's say we want to deploy artifact to the releases repository:
<distributionManagement>
    <repository>
        <id>my-domain-repository</id>
        <url>http://repo.my-domain.com/releases</url>
    </repository>
</distributionManagement>
To use generated token, add a new server in your :
<settings>
  <servers>
    <server>
      <!-- Id has to match the id provided in pom.xml -->
      <id>my-domain-repository</id>
      <username>{token}</username>
      <password>{secret}</password>
    </server>
  </servers>
</settings>
If you've configured everything correctly, you should be able to deploy artifact using the following command:
$ mvn deploy

Did you find misleading or deprecated content? Maybe you just feel this section misses important elements?

Guide

Copyright © 2023 dzikoysk with ❤ panda-lang