将本地的JAR包上传到Maven中央仓库是一个涉及多个步骤的过程。以下是一个详细的步骤指南:### 准备工作1. **注册Maven中央仓库账号**: - 访问[Maven Central](https:central.sonatype.org)并注册一个
摘要:准备工作 注册账号 官网地址:https:central.sonatype.com 注册命名空间 刚才注册好的账号,登录系统 验证namespace 创建推送的账号密码 复制内容如下 <server&am
准备工作
注册账号
官网地址:https://central.sonatype.com/
注册命名空间
刚才注册好的账号,登录系统
验证namespace
创建推送的账号密码
复制内容如下
<server>
<id>${server}</id>
<username>xxxxxx</username>
<password>xxxxxx</password>
</server>
把内容粘贴到maven的配置文件settings.xml中,${server}可以自定义。
GPG验证配置(这步很重要)
GPG,全称为GNU Privacy Guard,是一个开源的加密软件,基于OpenPGP标准(RFC 4880)。它可以用于加密和解密数据、签名和验证数据,以及管理加密密钥。
下载地址:https://gnupg.org/download/index.html
生成密钥
gpg --gen-key
根据提示输入真实姓名、邮箱(与git仓库邮箱一致),回车生成秘钥,此处会弹出弹框需要输入秘钥密码(后续上传jar会使用到)。
