栏目分类:
子分类:
返回
终身学习网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
终身学习网 > IT > 软件开发 > 后端开发 > Java

发布到maven中央仓库

Java 更新时间:发布时间: 百科书网 趣学号
  • 访问 https://issues.sonatype.org/secure/Dashboard.jspa 网站

  • 建issue什么的就不说了,很多博客都写了,终点在后面发布

  • 上传gpg key

gpg --keyserver hkp://keyserver.ubuntu.com:11371 --send-keys [你的key]
  • maven settings.xml设置
	
		ossrh
		sonatype账号
		sonatype密/password>
	
  • pom.xml设置
  • 一定要设置name description url标签,否则后面发布的时候会报错,
  • 注意仓库地址设置新的 https://s01.oss.sonatype.org/content/repositories/snapshots,很多博客这个地址是错的
    dbApi-spring-boot-starter
    dbApi-spring-boot-starter
    https://gitee.com/freakchicken/dbApi-spring-boot-starter

    
        
            freakchick
            jiangqiang110@126.com
            https://gitee.com/freakchicken/dbApi-spring-boot-starter
        
    

    
        https://gitee.com/freakchicken/dbApi-spring-boot-starter.git
        scm:git:https://gitee.com/freakchicken/dbApi-spring-boot-starter.git
        scm:git:https://gitee.com/freakchicken/dbApi-spring-boot-starter.git
    

    
        
            The Apache Software License, Version 2.0
            http://www.apache.org/licenses/LICENSE-2.0.txt
            repo
        
    

    
        
            ossrh
            https://s01.oss.sonatype.org/content/repositories/snapshots
        
        
            ossrh
            https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/
        
    

    
        
            
                org.apache.maven.plugins
                maven-compiler-plugin
                
                    1.8
                    1.8
                    UTF-8
                
            
            
                org.apache.maven.plugins
                maven-source-plugin
                2.2.1
                
                    
                        attach-sources
                        
                            jar-no-fork
                        
                    
                
            
            
                org.apache.maven.plugins
                maven-javadoc-plugin
                3.2.0
                
                    package
                    
                        
                            date
                        
                    
                
                
                    
                        attach-javadocs
                        package
                        
                            jar
                        
                        
                            none
                        
                    
                
            


            
                org.apache.maven.plugins
                maven-gpg-plugin
                1.0
                
                    
                        sign-artifacts
                        verify
                        
                            sign
                        
                    
                
            

        
    
  • 执行mvn deploy ,上传成功,这个过程中会弹框输入gpg密码

  • 访问 https://s01.oss.sonatype.org/#stagingRepositories

  • 点击右上角登陆,账户密码就是sonatype网站的账户密码

  • 点击close,并点击/confirm/i

  • 过一段时间发现release按钮可点,如果没有,检查下面的close报错信息
  • 点击release按钮
  • 过一段时间发现staging repositories中没有了,表示成功了
  • 并且可以搜索到自己的项目,表示确实成功了
  • aliyun maven仓库要等待几个小时以后才同步成功
转载请注明:文章转载自 www.051e.com
本文地址:http://www.051e.com/it/274949.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 ©2023-2025 051e.com

ICP备案号:京ICP备12030808号