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

宝山做网站公司企业网站建设合同书模板

宝山做网站公司,企业网站建设合同书模板,联合办公室设计,找人代做网站需要注意什么发布自己的项目到maven中央仓库 Maven Central Account 访问:https://central.sonatype.com/,点击右上角,根据提示注册账号 构建User token ,用于访问中央仓库的API: 点击右上角,查看账户点击Generate Us…

发布自己的项目到maven中央仓库

Maven Central Account

  1. 访问:https://central.sonatype.com/,点击右上角,根据提示注册账号
    在这里插入图片描述
  2. 构建User token ,用于访问中央仓库的API:
    • 点击右上角,查看账户
    • 点击Generate User Token,根据提示,构建个人访问令牌
    • 将获取的User Token xml代码配置到maven配置文件settings.xml 的servers属性中
      在这里插入图片描述
      在这里插入图片描述

POM.xml

配置需要发布的项目中的POM.xml文件

  1. 配置编译项目的java版本
<properties><maven.compiler.source>11</maven.compiler.source><maven.compiler.target>11</maven.compiler.target><java.version>11</java.version>
</properties>
  1. 配置项目名称、项目地址、打包方式
<name>xx xx</name>
<description>desc</description>
<url>https://github.com/xx/xx.xx.xx</url>
<packaging>pom</packaging>
  1. 配置私库地址
    • 仓库地址分为正式版(releases repository)和预览版(snapshot repository)
    • id:在settings.xml中配置的server id
    • name:仓库名称
    • ur:对应的私库地址
<distributionManagement><repository><id>central</id><name>Maven Central</name><url>https://repo.maven.apache.org/maven2</url></repository>
</distributionManagement>
  1. 配置开发者信息、项目开源许可证、代码仓库地址
<developers><developer><id>000000000</id><name>xxxxxxx</name><email>000000000@qq.com</email></developer></developers><licenses><license><name>MIT License</name><url>https://opensource.org/licenses/MIT</url><distribution>repo</distribution></license></licenses><scm><connection>https://github.com/xx/xx.xx.xx.git</connection><url>https://github.com/xx/xx.xx.xx</url></scm>
  1. 配置打包插件

    • maven-source-plugin:源代码打包工具,中央仓库也会对源代码进行验证
    • maven-javadoc-plugin:javadoc文档打包工具,中央仓库会对javadoc经行验证,没有文档会验证失败
<build><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-source-plugin</artifactId><version>${maven-source-plugin.version}</version><inherited>true</inherited><executions><execution><id>attach-sources</id><goals><goal>jar</goal></goals></execution></executions><configuration><excludeResources>true</excludeResources><useDefaultExcludes>true</useDefaultExcludes></configuration></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-javadoc-plugin</artifactId><version>${maven-javadoc-plugin.version}</version><inherited>true</inherited><executions><execution><id>bundle-sources</id><phase>package</phase><goals><goal>jar</goal></goals></execution></executions><configuration><encoding>UTF-8</encoding><charset>UTF-8</charset><show>protected</show><notree>true</notree><failOnError>false</failOnError><doclint>none</doclint></configuration></plugin></plugins>
</build>
  1. 配置发布插件

    • central-publishing-maven-plugin:中央仓库发布插件
    • maven-deploy-plugin maven:maven发布插件,任何仓库都需要这个插件
    • maven-gpg-plugin:对发布的项目文件进行签名,中央仓库会对文件进行验签,GPG签名详见:https://central.sonatype.org/publish/requirements/gpg/
<build><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-deploy-plugin</artifactId><version>${maven-deploy-plugin.version}</version></plugin><plugin><groupId>org.sonatype.central</groupId><artifactId>central-publishing-maven-plugin</artifactId><version>${central-publishing-maven-plugin.version}</version><extensions>true</extensions><configuration><publishingServerId>central</publishingServerId><autoPublish>true</autoPublish><waitUntil>published</waitUntil></configuration></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-gpg-plugin</artifactId><version>${maven-gpg-plugin.version}</version><executions><execution><id>sign-artifacts</id><phase>verify</phase><goals><goal>sign</goal></goals><configuration><keyname>288F5FE69C7B21AB</keyname><passphraseServerId>288F5FE69C7B21AB</passphraseServerId></configuration></execution></executions></plugin></plugins>
</build>

发布

  1. 运行发布命令
mvn deploy
  1. 等待maven central验证,如果发布状态不是published,那么就是发布失败,需要根据提示进行相应的更改
    在这里插入图片描述

FAQ

  1. Javadocs must be provided but not found in entries:因为中央仓库没找到Javadoc文档,所以需要打包Javadoc文档,java 1.8打包doc文档时,会报异常,建议提升至java11打包
  2. Illegal reflective access by lombok.javac.apt.LombokProcessor xxx:java11打包Lombok时,需要查看Lombok和java版本是否支持
http://www.yayakq.cn/news/461780/

相关文章:

  • 专业建设外贸网站制作江门挖掘爱站网
  • 对做网站有什么建议阿克顿巴网站建设的目的
  • 外贸营销型网站策划中seo层面包括做网站如何组建域名
  • 鞍山网站网站建设手机建筑设计app
  • 沈阳网站制作公司哪家好网站开发西安
  • 简要说明网站建设的步骤深圳室内设计公司招聘
  • 网站静态和动态区别是什么意思陇南市建设局网站公示
  • 北京专业的做网站手机端网站html好看的单页模板
  • c# 开发网站开发郑州网站建设xinsu360
  • php网站开发主要内容中山网站建设是什么意思
  • 青海学会网站建设公司网站下拉菜单重叠
  • 如何做网站分析长沙专业做网站公司
  • 网站开发流程的意义企业网站托管外包平台
  • 网站建设数据库放哪phpstudy如何搭建网站
  • 南昌知名网站建设福州百度关键词排名
  • 云南哪有网站建设推广wordpress 固定链接 插件
  • 产品设计师网站企业官网型网站建设
  • 网站备案 资讯wordpress怎么远程保存图片大小
  • 南宁市住房和城乡建设部网站西安企业注册
  • php网站环境配置装潢设计师培训班学费
  • 设计网站实现PDF在线阅读需要怎么做微信开放平台登录入口
  • 做门户网站有前途吗情感视频素材网站
  • 网站百度提示风险视频链接下载到本地
  • 广州建网站开发seo型企业网站微信app下载安装旧版本
  • vue.js网站开发用例南宁网站设计公司
  • 安徽网站开发与维护专业长沙做网站哪个最好
  • python 做网站开发网站怎么编辑
  • 兰州网站优化服务网站建设好后怎么制作网页
  • 最专业网站建设公电子商务和网站建设区别
  • 做国外搞笑网站网站热力图怎么做