A parent pom for deploying artifacts to the Central Repository.
Just set this artifact as parent.
<parent>
<groupId>io.github.jinahya</groupId>
<artifactId>central-parent</artifactId>
</parent>
Put your credentials to the $M2_HOME/settings.xml
. See Publishing By Using the Maven Plugin.
<server>
<id>central</id>
<username><!-- your token username --></username>
<password><!-- your token password --></password>
</server>
See Publishing By Using the Maven Plugin for more options.
$ git switch -d x.y.z
$ mvn -Pcentral clean deploy