当前位置: 首页 > news >正文

盐城做网站推广电话烟台外贸网站建设

盐城做网站推广电话,烟台外贸网站建设,区块链网站开发,python如何开发小软件参考博客:将组件发布到maven中央仓库-CSDN博客 感谢这位博主。但是他的步骤有漏缺,相对进行补充 访问管理页面 网址:Maven Central 新注册账号,或者使用github快捷登录,建议使用github快捷登录 添加命名空间 注意&…

参考博客:将组件发布到maven中央仓库-CSDN博客 感谢这位博主。但是他的步骤有漏缺,相对进行补充

访问管理页面

网址:Maven Central

新注册账号,或者使用github快捷登录,建议使用github快捷登录

添加命名空间

注意,如果使用github快捷登录,默认携带 io.github.?? 的命名空间,如果自己的代码在github上,可以直接使用这个命名空间

如果代码在 码云 仓库,

提交后,提示需要验证空间,需要按照要求,到 码云 仓库创建一个对应名称的空内容的项目,然后点击认证。

如上图, io.gitee.wsitm 是我的命名空间

添加其他命名空间见 Register a Namespace - The Central Repository Documentation

创建代码仓库

注意:代码一定需要符合开源,可以使用MIT开源,或其他开源。创建开源极为容易,gitee默认会提示创建开源,有快捷入口,点击快速创建。

代码的pom.xml的配置

具体如下:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>io.gitee.wsitm</groupId><artifactId>wsitm-clutter</artifactId><version>0.0.1</version><url>https://gitee.com/wsitm/wsitm-clutter.git</url><packaging>jar</packaging><name>${project.artifactId}</name><description>wsitm-clutter杂烩工具</description><dependencies></dependencies><licenses><license><name>MIT License</name><url>https://opensource.org/licenses/MIT</url><comments>The project itself is licensed under MIT License.</comments></license></licenses><developers><developer><name>yourname</name><email>youremail@qq.com</email></developer></developers><scm><connection>scm:git@gitee.com:wsitm/wsitm-clutter.git</connection><developerConnection>scm:git@gitee.com:wsitm/wsitm-clutter.git</developerConnection><url>https://gitee.com/wsitm/wsitm-clutter.git</url></scm><build><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-source-plugin</artifactId><version>3.3.0</version><executions><execution><id>attach-sources</id><goals><goal>jar-no-fork</goal></goals></execution></executions></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-javadoc-plugin</artifactId><version>2.9.1</version><configuration><aggregate>true</aggregate><charset>UTF-8</charset><encoding>UTF-8</encoding><docencoding>UTF-8</docencoding><additionalparam>-Xdoclint:none</additionalparam></configuration><executions><execution><id>attach-javadocs</id><goals><goal>jar</goal></goals></execution></executions></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-gpg-plugin</artifactId><version>3.1.0</version><executions><execution><id>sign-artifacts</id><phase>verify</phase><goals><goal>sign</goal></goals></execution></executions></plugin><!--maven插件--><plugin><groupId>org.sonatype.central</groupId><artifactId>central-publishing-maven-plugin</artifactId><version>0.4.0</version><extensions>true</extensions><configuration><publishingServerId>central</publishingServerId><tokenAuth>true</tokenAuth></configuration></plugin></plugins></build>
</project>

生成GPG密钥

作用:这是用于给自身源码加签名

下载GPG管理软件:https://gnupg.org/download/index.html


点击进入下载页面

如上图,当然,如果有钱也可以捐献一些。我不一样,我白嫖

安装完成之后,使用命令生成密钥,命令:  gpg –gen-key

生成之后

推送密钥到远程服务端

命令:  gpg --keyserver hkp://keyserver.ubuntu.com --send-keys [生成密钥后的标识]

例子:gpg --keyserver hkp://keyserver.ubuntu.com --send-keys 2*************F6449

服务:--keyserver 有三个官方网址可以切换

  • keyserver.ubuntu.com
  • keys.openpgp.org
  • pgp.mit.edu

注意:可能推送不成功,三个网址我都测试不成功,不知道什么原因,只能使用另一种方法

公钥如下:

复制全部内容,手动上传,打开服务网址:  https://keyserver.ubuntu.com/#

生成token

得到的token格式如下:

maven的setting.xml的配置

具体如下:

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"><servers><server><id>central</id><username>${tokenId}</username><password>${tokenPass}</password></server></servers><profiles><profile><id>gpg</id><properties><gpg.executable>gpg</gpg.executable><gpg.keyname>youremail@qq.com</gpg.keyname><gpg.passphrase>${pgp-password}</gpg.passphrase><gpg.useagent>true</gpg.useagent></properties></profile></profiles>
</settings>

发布到仓库

进入代码目录,执行命令:  mvn clean deploy

发布完成,打开管理页面


提交后需要验证,如果正常

如果异常,查看错误描述

去仓库查看自己的项目

阿里云:  仓库服务

官方:  Central Repository:

官方页面:https://mvnrepository.com/

注:阿里云,和官方能在审核后1小时内能查到自己的项目,但是官方页面需要好多天才能查询。但直接在maven中引用即可,并不影响使用

http://www.yayakq.cn/news/224939/

相关文章:

  • 营销网络建设方案宁波做网站seo
  • 商务网站建设教学视频教程企业外包是什么意思
  • 青岛高端网站建设软件开发要学什么
  • 电商网站开发 上海wordpress q8hpk
  • 小白建站做网站需要什么框架
  • 集团网站网页模板网站建设和网站设计一样吗
  • 足球做网站首页格局微网站的建设
  • 青田网站做服装找工作企业网站建设合同范本
  • 用ps怎么做网站的效果图cms智能云平台
  • 亚洲网站正在建设中用wordpress还是用框架
  • 用自己的ip怎么查看dw8建设的网站景区微网站 建设方案
  • 深圳的设计网站大全水果网站模版
  • 江苏省义务教育标准化建设网站海南赞赞网络科技有限公司
  • 网站icp备案号怎么查炫酷的网站设计
  • 旅游网站的广告预算怎么做应用大全网站
  • 百度网站排名哪家好那个网站做问卷好
  • 网站开发工作总结论文wordpress获得留言
  • 品牌网站建设设计wordpress建电影网站
  • 建网站怎么挣钱手机要访问国外网站如何做
  • 门户网站ui设计定制礼品公司
  • 学校网站模版安徽省建设工程信息网网
  • 池州专业网站建设公司注册公司具体费用
  • 股票订阅网站开发wordpress付费破解版
  • 高清的宝安网站推广广告设计与制作专业认识
  • 辽宁省建设行业协会网站电商网站图片是谁做
  • 淘宝优惠券网站怎么做的低代码无代码平台
  • 天河区建设和水务局网站湛江市建网站
  • 网站设计大公司无线网站应建设在什么地方
  • 福建省港航建设发展有限公司网站win7 做服务器开网站
  • 关于百度网站的优缺点dw网站模板下载地址