在学习springboot框架的时候,会引入各种各样的starter依赖,照着教程尝试写了个demo-spring-boot-stater,可以理解为一个组件,随引随用

但是只能自己引用,无法共享,于是想将其发布到maven中央仓库

网上参考了些发布到maven中央仓库的教程

如何发布Jar包到Maven中央仓库

如何发布jar包到maven中央仓库详细教程

向maven中央仓库发布jar包或pom

gpg加密发布jar包到maven中央仓库详细过程以及踩的坑

大致流程

  1. 注册sonatype并提交issue工单

  2. 认证域名

  3. GPG生成密钥

  4. 制作jar包

  5. 发布jar包

上面一些文章操作的都很详细,在此记录下自己遇到的些问题以及解决方式

  • pom.xml校验挺严格,比如必须要有url,description,scm,developers,licenses,source,javadoc,gpg
  • 前一阵子正好是70周年大庆,不能脑壳疼
  • deploy操作时,出现roject description missing, Project URL missing 错误提示已经很明确了,pom.xml中缺少description和url,可见发布的时候对pom.xml的校验比较严格,也确实,毕竟到时候是需要显示的
  • 代码中的文档注释,必须明确,参数不能瞎写,因为pom.xml引入了javadoc插件,生成文档的时候回报错
  • 由于我是windows环境,在cmd窗口执行的时候,会出现找不到gpg命令,解决方式,使用power shell解决
  • deploy操作时出现504网关错误,这没事,只是不巧赶上了人家服务错误的问题

如下是完整的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>cn.chendahai</groupId>
<artifactId>demo-spring-boot-starter</artifactId>
<version>1.1.2</version>
<packaging>jar</packaging>
<name>demo-spring-boot-starter</name>
<description>spring-boot-starter-demo</description>
<url>https://github.com/chywx/demo-spring-boot-starter</url> <dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.1.0.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement> <!--licenses信息-->
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses> <!--scm信息-->
<scm>
<url>http://chendahai.cn</url>
<connection>scm:git:https://github.com/chywx/demo-spring-boot-starter.git</connection>
<developerConnection>scm:git:https://github.com/chywx/demo-spring-boot-starter.git</developerConnection>
</scm> <!--发布者信息-->
<developers>
<developer>
<name>chenhaiyang</name>
<email>chy1559843332@outlook.com</email>
<organization>http://chendahai.cn</organization>
<organizationUrl>http://chendahai.cn</organizationUrl>
</developer>
</developers> <build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<!--Compiler-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<!--source-->
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!--javadoc-->
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
<configuration>
<charset>UTF-8</charset>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- gpg plugin,用于签名认证 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<!--staging puglin,用于自动执行发布阶段(免手动)-->
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<!-- release plugin,用于发布到release仓库部署插件 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.4.2</version>
</plugin>
</plugins>
</build> <!--定义snapshots库和releases库的nexus地址-->
<distributionManagement>
<snapshotRepository>
<!--oss需要对应到settings.xml下的service的id-->
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement> </project>

maven的settings.xml

<!--需要添加-->
<server>
<id>ossrh</id>
<username>sonatype账号</username>
<password>sonatype密码</password>
</server>

特别说明下nexus-staging-maven-plugin插件

            <plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>

staging puglin,用于自动执行发布阶段(免手动)

因为deploy之后,默认状态为open,你需要在后台https://oss.sonatype.org 手动closed,再release

当然,加上这个插件,将autoReleaseAfterClose指定为true,即可自动发布

Release完成后,约需要等待两三个小时,在 https://search.maven.orghttps://mvnrepository.com 便可以搜到自己发布的依赖了!!!!

同步到第三方仓库,如阿里云等会更慢

如下为完整的deploy日志

PS C:\Users\Administrator> cd D:/MyProject/demo-spring-boot-starter
PS D:\MyProject\demo-spring-boot-starter> mvn clean deploy '-Dmaven.test.skip=true'
[WARNING]
[WARNING] Some problems were encountered while building the effective settings
[WARNING] expected START_TAG or END_TAG not TEXT (position: TEXT seen ...mojo" if these are not already contained in the list.\n |-->\n <p... @79:5) @ D:\maven\apache-maven-3.6.1\bin\..\conf\settings.xml, line 79, column 5
[WARNING]
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for cn.chendahai:demo-spring-boot-starter:jar:1.1.
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line , column
[WARNING] 'build.plugins.plugin.version' for org.springframework.boot:spring-boot-maven-plugin is missing. @ line , column
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO] Inspecting build with total of modules...
[INFO] Installing Nexus Staging features:
[INFO] ... total of executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin
[INFO]
[INFO] ---------------< cn.chendahai:demo-spring-boot-starter >----------------
[INFO] Building demo-spring-boot-starter 1.1.
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ demo-spring-boot-starter ---
[INFO] Deleting D:\MyProject\demo-spring-boot-starter\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ demo-spring-boot-starter ---
[WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ demo-spring-boot-starter ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding GBK, i.e. build is platform dependent!
[INFO] Compiling source files to D:\MyProject\demo-spring-boot-starter\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ demo-spring-boot-starter ---
[INFO] Not copying test resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ demo-spring-boot-starter ---
[INFO] Not compiling test sources
[INFO]
[INFO] --- maven-surefire-plugin:2.12.:test (default-test) @ demo-spring-boot-starter ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ demo-spring-boot-starter ---
[INFO] Building jar: D:\MyProject\demo-spring-boot-starter\target\demo-spring-boot-starter-1.1..jar
[INFO]
[INFO] >>> maven-source-plugin:3.0.:jar (attach-sources) > generate-sources @ demo-spring-boot-starter >>>
[INFO]
[INFO] <<< maven-source-plugin:3.0.:jar (attach-sources) < generate-sources @ demo-spring-boot-starter <<<
[INFO]
[INFO]
[INFO] --- maven-source-plugin:3.0.:jar (attach-sources) @ demo-spring-boot-starter ---
[INFO] Building jar: D:\MyProject\demo-spring-boot-starter\target\demo-spring-boot-starter-1.1.-sources.jar
[INFO]
[INFO] --- maven-javadoc-plugin:2.10.:jar (attach-javadocs) @ demo-spring-boot-starter ---
[WARNING] Source files encoding has not been set, using platform encoding GBK, i.e. build is platform dependent!
[INFO]
正在加载程序包cn.chendahai.demo的源文件...
正在构造 Javadoc 信息...
标准 Doclet 版本 1.8.0_211
正在构建所有程序包和类的树...
正在生成D:\MyProject\demo-spring-boot-starter\target\apidocs\cn\chendahai\demo\DemoService.html...
正在生成D:\MyProject\demo-spring-boot-starter\target\apidocs\cn\chendahai\demo\DemoServiceProperties.html...
正在生成D:\MyProject\demo-spring-boot-starter\target\apidocs\cn\chendahai\demo\DemoStarterEnableAutoConfiguration.html...
正在生成D:\MyProject\demo-spring-boot-starter\target\apidocs\cn\chendahai\demo\package-frame.html...
正在生成D:\MyProject\demo-spring-boot-starter\target\apidocs\cn\chendahai\demo\package-summary.html...
正在生成D:\MyProject\demo-spring-boot-starter\target\apidocs\cn\chendahai\demo\package-tree.html...
正在生成D:\MyProject\demo-spring-boot-starter\target\apidocs\constant-values.html...
正在生成D:\MyProject\demo-spring-boot-starter\target\apidocs\cn\chendahai\demo\class-use\DemoStarterEnableAutoConfiguration.html...
正在生成D:\MyProject\demo-spring-boot-starter\target\apidocs\cn\chendahai\demo\class-use\DemoServiceProperties.html...
正在生成D:\MyProject\demo-spring-boot-starter\target\apidocs\cn\chendahai\demo\class-use\DemoService.html...
正在生成D:\MyProject\demo-spring-boot-starter\target\apidocs\cn\chendahai\demo\package-use.html...
正在构建所有程序包和类的索引...
正在生成D:\MyProject\demo-spring-boot-starter\target\apidocs\overview-tree.html...
正在生成D:\MyProject\demo-spring-boot-starter\target\apidocs\index-all.html...
正在生成D:\MyProject\demo-spring-boot-starter\target\apidocs\deprecated-list.html...
正在构建所有类的索引...
正在生成D:\MyProject\demo-spring-boot-starter\target\apidocs\allclasses-frame.html...
正在生成D:\MyProject\demo-spring-boot-starter\target\apidocs\allclasses-noframe.html...
正在生成D:\MyProject\demo-spring-boot-starter\target\apidocs\index.html...
正在生成D:\MyProject\demo-spring-boot-starter\target\apidocs\help-doc.html...
[INFO] Building jar: D:\MyProject\demo-spring-boot-starter\target\demo-spring-boot-starter-1.1.-javadoc.jar
[INFO]
[INFO] --- maven-gpg-plugin:1.6:sign (sign-artifacts) @ demo-spring-boot-starter ---
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ demo-spring-boot-starter ---
[INFO] Installing D:\MyProject\demo-spring-boot-starter\target\demo-spring-boot-starter-1.1..jar to D:\maven\mymaven\repository\cn\chendahai\demo-spring-boot-starter\1.1.\demo-spring-boot-starter-1.1..jar
[INFO] Installing D:\MyProject\demo-spring-boot-starter\pom.xml to D:\maven\mymaven\repository\cn\chendahai\demo-spring-boot-starter\1.1.\demo-spring-boot-starter-1.1..pom
[INFO] Installing D:\MyProject\demo-spring-boot-starter\target\demo-spring-boot-starter-1.1.-sources.jar to D:\maven\mymaven\repository\cn\chendahai\demo-spring-boot-starter\1.1.\demo-spring-boot-starter-1.1.-sources.jar
[INFO] Installing D:\MyProject\demo-spring-boot-starter\target\demo-spring-boot-starter-1.1.-javadoc.jar to D:\maven\mymaven\repository\cn\chendahai\demo-spring-boot-starter\1.1.\demo-spring-boot-starter-1.1.-javadoc.jar
[INFO] Installing D:\MyProject\demo-spring-boot-starter\target\demo-spring-boot-starter-1.1..jar.asc to D:\maven\mymaven\repository\cn\chendahai\demo-spring-boot-starter\1.1.\demo-spring-boot-starter-1.1..jar.asc
[INFO] Installing D:\MyProject\demo-spring-boot-starter\target\demo-spring-boot-starter-1.1..pom.asc to D:\maven\mymaven\repository\cn\chendahai\demo-spring-boot-starter\1.1.\demo-spring-boot-starter-1.1..pom.asc
[INFO] Installing D:\MyProject\demo-spring-boot-starter\target\demo-spring-boot-starter-1.1.-sources.jar.asc to D:\maven\mymaven\repository\cn\chendahai\demo-spring-boot-starter\1.1.\demo-spring-boot-starter-1.1.-sources.jar.asc
[INFO] Installing D:\MyProject\demo-spring-boot-starter\target\demo-spring-boot-starter-1.1.-javadoc.jar.asc to D:\maven\mymaven\repository\cn\chendahai\demo-spring-boot-starter\1.1.\demo-spring-boot-starter-1.1.-javadoc.jar.asc
[INFO]
[INFO] --- nexus-staging-maven-plugin:1.6.:deploy (injected-nexus-deploy) @ demo-spring-boot-starter ---
[INFO] Performing local staging (local stagingDirectory="D:\MyProject\demo-spring-boot-starter\target\nexus-staging\staging")...
[INFO] + Using server credentials "ossrh" from Maven settings.
[INFO] * Connected to Nexus at https://oss.sonatype.org:443/, is version 2.14.14-01 and edition "Professional"
[INFO] * Using staging profile ID "ba067c55e451" (matched by Nexus).
[INFO] Installing D:\MyProject\demo-spring-boot-starter\target\demo-spring-boot-starter-1.1..jar to D:\MyProject\demo-spring-boot-starter\target\nexus-staging\staging\ba067c55e451\cn\chendahai\demo-spring-boot-starter\1.1.\demo-spring-boot-starter-1.1..jar
[INFO] Installing D:\MyProject\demo-spring-boot-starter\pom.xml to D:\MyProject\demo-spring-boot-starter\target\nexus-staging\staging\ba067c55e451\cn\chendahai\demo-spring-boot-starter\1.1.\demo-spring-boot-starter-1.1..pom
[INFO] Installing D:\MyProject\demo-spring-boot-starter\target\demo-spring-boot-starter-1.1.-sources.jar to D:\MyProject\demo-spring-boot-starter\target\nexus-staging\staging\ba067c55e451\cn\chendahai\demo-spring-boot-starter\1.1.\demo-spring-boot-starter-1.1.-sources.jar
[INFO] Installing D:\MyProject\demo-spring-boot-starter\target\demo-spring-boot-starter-1.1.-javadoc.jar to D:\MyProject\demo-spring-boot-starter\target\nexus-staging\staging\ba067c55e451\cn\chendahai\demo-spring-boot-starter\1.1.\demo-spring-boot-starter-1.1.-javadoc.jar
[INFO] Installing D:\MyProject\demo-spring-boot-starter\target\demo-spring-boot-starter-1.1..jar.asc to D:\MyProject\demo-spring-boot-starter\target\nexus-staging\staging\ba067c55e451\cn\chendahai\demo-spring-boot-starter\1.1.\demo-spring-boot-starter-1.1..jar.asc
[INFO] Installing D:\MyProject\demo-spring-boot-starter\target\demo-spring-boot-starter-1.1..pom.asc to D:\MyProject\demo-spring-boot-starter\target\nexus-staging\staging\ba067c55e451\cn\chendahai\demo-spring-boot-starter\1.1.\demo-spring-boot-starter-1.1..pom.asc
[INFO] Installing D:\MyProject\demo-spring-boot-starter\target\demo-spring-boot-starter-1.1.-sources.jar.asc to D:\MyProject\demo-spring-boot-starter\target\nexus-staging\staging\ba067c55e451\cn\chendahai\demo-spring-boot-starter\1.1.\demo-spring-boot-starter-1.1.-sources.jar.asc
[INFO] Installing D:\MyProject\demo-spring-boot-starter\target\demo-spring-boot-starter-1.1.-javadoc.jar.asc to D:\MyProject\demo-spring-boot-starter\target\nexus-staging\staging\ba067c55e451\cn\chendahai\demo-spring-boot-starter\1.1.\demo-spring-boot-starter-1.1.-javadoc.jar.asc
[INFO] Performing remote staging...
[INFO]
[INFO] * Remote staging into staging profile ID "ba067c55e451"
[INFO] * Created staging repository with ID "cnchendahai-1038".
[INFO] * Staging repository at https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/cnchendahai-1038
[INFO] * Uploading locally staged artifacts to profile cn.chendahai
Uploading to ossrh: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/cnchendahai-1038/cn/chendahai/demo-spring-boot-starter/1.1.2/demo-spring-boot-starter-1.1.2.pom.asc
Uploaded to ossrh: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/cnchendahai-1038/cn/chendahai/demo-spring-boot-starter/1.1.2/demo-spring-boot-starter-1.1.2.pom.asc (499 B at 175 B/s)
Downloading from ossrh: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/cnchendahai-1038/cn/chendahai/demo-spring-boot-starter/maven-metadata.xml
Uploading to ossrh: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/cnchendahai-1038/cn/chendahai/demo-spring-boot-starter/maven-metadata.xml
Uploaded to ossrh: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/cnchendahai-1038/cn/chendahai/demo-spring-boot-starter/maven-metadata.xml (316 B at 86 B/s)
Uploading to ossrh: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/cnchendahai-1038/cn/chendahai/demo-spring-boot-starter/1.1.2/demo-spring-boot-starter-1.1.2-sources.jar
Uploaded to ossrh: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/cnchendahai-1038/cn/chendahai/demo-spring-boot-starter/1.1.2/demo-spring-boot-starter-1.1.2-sources.jar (4.5 kB at 799 B/s)
Uploading to ossrh: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/cnchendahai-1038/cn/chendahai/demo-spring-boot-starter/1.1.2/demo-spring-boot-starter-1.1.2-javadoc.jar.asc
Uploaded to ossrh: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/cnchendahai-1038/cn/chendahai/demo-spring-boot-starter/1.1.2/demo-spring-boot-starter-1.1.2-javadoc.jar.asc (499 B at 1.0 kB/s)
Uploading to ossrh: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/cnchendahai-1038/cn/chendahai/demo-spring-boot-starter/1.1.2/demo-spring-boot-starter-1.1.2.jar
Uploaded to ossrh: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/cnchendahai-1038/cn/chendahai/demo-spring-boot-starter/1.1.2/demo-spring-boot-starter-1.1.2.jar (5.2 kB at 830 B/s)
Uploading to ossrh: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/cnchendahai-1038/cn/chendahai/demo-spring-boot-starter/1.1.2/demo-spring-boot-starter-1.1.2.pom
Uploaded to ossrh: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/cnchendahai-1038/cn/chendahai/demo-spring-boot-starter/1.1.2/demo-spring-boot-starter-1.1.2.pom (5.7 kB at 3.0 kB/s)
Uploading to ossrh: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/cnchendahai-1038/cn/chendahai/demo-spring-boot-starter/1.1.2/demo-spring-boot-starter-1.1.2.jar.asc
Uploaded to ossrh: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/cnchendahai-1038/cn/chendahai/demo-spring-boot-starter/1.1.2/demo-spring-boot-starter-1.1.2.jar.asc (499 B at 1.0 kB/s)
Uploading to ossrh: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/cnchendahai-1038/cn/chendahai/demo-spring-boot-starter/1.1.2/demo-spring-boot-starter-1.1.2-javadoc.jar
Uploaded to ossrh: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/cnchendahai-1038/cn/chendahai/demo-spring-boot-starter/1.1.2/demo-spring-boot-starter-1.1.2-javadoc.jar (35 kB at 6.0 kB/s)
Uploading to ossrh: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/cnchendahai-1038/cn/chendahai/demo-spring-boot-starter/1.1.2/demo-spring-boot-starter-1.1.2-sources.jar.asc
Uploaded to ossrh: https://oss.sonatype.org:443/service/local/staging/deployByRepositoryId/cnchendahai-1038/cn/chendahai/demo-spring-boot-starter/1.1.2/demo-spring-boot-starter-1.1.2-sources.jar.asc (499 B at 1.0 kB/s)
[INFO] * Upload of locally staged artifacts finished.
[INFO] * Closing staging repository with ID "cnchendahai-1038". Waiting for operation to complete...
...... [INFO] Remote staged repositories, finished with success.
[INFO] Remote staging repositories are being released... Waiting for operation to complete...
..... [INFO] Remote staging repositories released.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: : min
[INFO] Finished at: --12T10::+:
[INFO] ------------------------------------------------------------------------
PS D:\MyProject\demo-spring-boot-starter>
PS D:\MyProject\demo-spring-boot-starter>

将jar包发布到maven的中央仓库细节整理的更多相关文章

  1. 如何将JAR包发布到Maven中央仓库?

    将jar包发布到Maven中央仓库(Maven Central Repository),这样所有的Java开发者都可以使用Maven直接导入依赖,例如fundebug-java: <!-- ht ...

  2. 将jar包发布到maven中央仓库

    将jar包发布到maven中央仓库 最近做了一个swagger-ui的开源项目,因为是采用vue进行解析swagger-json,需要前端支持,为了后端也能方便的使用此功能,所以将vue项目编译后的结 ...

  3. 构建自己的jar包上传至Mvaen中央仓库和版本更新

    构建自己的jar包上传至Mvaen中央仓库和版本更新 一直羡慕别人制造轮子,开源项目,供别人使用:我也想这样,可以自己才疏学浅,本次就将自己写小工具上传到Maven的中央仓库. 一步一步详细教程演示如 ...

  4. 贡献你的代码,将jar包发布到Maven中央仓库以及常见错误的解决办法

    前几天将自己的日志工具发布到了Maven中央仓库中.这个工具本省没有多少技术含量,因为是修改别人的源代码实现的,但是将jar发布到Maven仓库却收获颇丰,因为网上有些教程过时了,在此分享下自己发布j ...

  5. Dev 日志 | 如何将 jar 包发布到 Maven 中央仓库

    摘要 Maven 中央仓库并不支持直接上传 jar 包,因此需要将 jar 包发布到一些指定的第三方 Maven 仓库,比如:Sonatype OSSRH 仓库,然后该仓库再将 jar 包同步到 Ma ...

  6. 将自己的项目作为jar包发布到maven中央仓库

    maven版本是3.5.0,jdk是1.8(注意,不是说项目是1.8就行,必须是环境变量里的也是,不能超过1.8,否则一大堆问题,执行mvn前用javac -version看下版本) 一:先在sona ...

  7. 如何把jar包发布到maven私服

    1.格式 mvn deploy:deploy-file -DgroupId=com.qiyi -DartifactId=sphinx -Dversion=1.0 -Dpackaging=jar -Df ...

  8. 把本地jar包发布到maven私服和本地maven库

    有时时候下载了jar包,但发现maven库里没有,可以将jar包上传到本地私服和本地maven库: 1.上传到本地私服 mvn deploy:deploy-file -Dfile=D:\GETUI_S ...

  9. 如何将jar包加入到Maven本地仓库

    原则上Maven的设计是不需要这么做的,因为pom.xml中依赖的jar包会自动实现从中央仓库下载到本地仓库.但是公司设计了一个setting,如果本地仓库没有,就去setting指定的url中下载j ...

随机推荐

  1. Ubuntu开机出现grub指令,无法正常开机

    问题 最近开机出现了如下的界面: 分析问题 首先看看GNU GRUB是什么东东?干什么用的? GNU GRUB是多重引导加载程序.通俗点说,它就是用来一个可以让你选择运行什么操作系统的程序. 在你开机 ...

  2. length属性、length()方法和size()的方法的区别

    JAVA 1. length属性是针对Java中的数组来说的,要求数组的长度可以用其length属性: 2.length()方法是针对字符串来说的,要求一个字符串的长度就要用到它的length()方法 ...

  3. 联想thinkpad如何关闭触摸板

    Tinkpad系列很多关闭触摸屏的功能的方法都是没有的!!!比如说1.Fn+F6,或者Fn+某个按键...直接关闭没用比如说2.控制面板,鼠标/键盘,找到触摸开关...间接关闭没用比如说3.我的电脑, ...

  4. MySql(二)_NHibernateHelper管理会话工厂

    1.定义接口的好处: (1) 清楚的看到里面有哪些方法: ( 2 )  可以更换实现类:Nhibernate实现件可以更换: Manger文件夹(另外两个是Model.Mappings文件夹) 首先M ...

  5. 做一个logitic分类之鸢尾花数据集的分类

    做一个logitic分类之鸢尾花数据集的分类 Iris 鸢尾花数据集是一个经典数据集,在统计学习和机器学习领域都经常被用作示例.数据集内包含 3 类共 150 条记录,每类各 50 个数据,每条记录都 ...

  6. Redis继续学习

    1.Redis一共16个数据库 # Set the number of databases. The , you can select # a different one on a per-conne ...

  7. 在命令行已经pip install flask-script,但是导包时出错

    问题:(已经安装好了flask-script,但是导入不成功) 然后在代码中导入相应的包:(报红) 后来发现是在自己创建项目的时候勾选的是创建的是在虚拟环境下的项目,所以环境有问题 所以我应该在虚拟环 ...

  8. 数据可视化之3D中国

    本文链接:https://blog.csdn.net/zhai_865327/article/details/82983489 其实一般情况下2D平面地图就够用了,但是为了更加美观及突出效果,就需要3 ...

  9. django学之路01--环境安装和pycharm运行django项目

    1. 环境安装 1).virtualenv安装 C:\Users\Administrator>pip install virtualenv Collecting virtualenv Using ...

  10. SWPU CTF题解

    本博客为西南石油大学(南充校区)CTF团队赛的题解 所有题目网址:http://47.106.87.69:9000/game 今天我是流泪狗狗头 解压后发现压缩包中是一个带有密码的图片,winhex分 ...