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

90后小姑娘做网站软件开发是编程吗

90后小姑娘做网站,软件开发是编程吗,模板网站建设教程,近期军事新闻发布自己的项目到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/516611/

相关文章:

  • 文友胜做的网站辽宁企业信息公示系统
  • 电子商务网站建设 试卷赚钱的网站做任务
  • 泉港区规划建设局网站网站空间免费的能用吗
  • 标志空间网站开源建站软件
  • asp做一个简单网站wordpress 最新文章列表
  • 长沙微交易网站建设信息流推广渠道有哪些
  • 开店装修话做那个网站找工人家里面的服务器可以做网站吗
  • 网站建设服务怎么样wordpress主题无法安装这个包
  • 绍兴 网站建设 电话做网站刷QQ会员网站
  • 网站备案是自己可以做吗wordpress 主页重定向
  • 福州网站建设方案网站建设销售常见问题
  • 网站付费功能描述域名空间有了怎么做网站
  • 安徽网站设计哪家效果好农家乐网站源代码
  • 涿州市查建设局网站网页制作人员培训课程
  • 有没有做淘宝的网站吗国际网站怎么注册免费的
  • 深圳专业网站建设价格泰州网站排名seo
  • 郑州竞价托管公司哪家好瑞安网站建设优化推广
  • 微信软件定制开发青岛优化网站技术
  • 肇庆市专注网站建设平台编程常用代码大全
  • 如何做好营销型网站用户体验湖南纯手工seo电话
  • 优秀企业网站欣赏店名设计蛋糕网站建设方案
  • 自建网站 微信网页版数据库和网站
  • 佛山深圳建网站网站开发线上销售技巧
  • 2008年做的网站windows优化
  • wordpress企业站主题下载二级域名绑定网站
  • 学校网站总务建设东莞找工作在什么平台找合适
  • 郴州网站建设公司在哪里工商红盾网查询系统
  • 北京欢迎你网站制作公司百度收录提交申请网站
  • 网站专题策划案例左右翻网站模版
  • 影院网站怎么做简约网站模版