在将新的项目提交到 Maven 中央仓库的时候,你可能会遇到错误提示为:
[ERROR] Rule "pom-staging" failures
[ERROR] * Invalid POM: /com/ossez/parent-modules/0.0.1/parent-modules-0.0.1.pom: Project name missing, Project description missing, Project URL missing, License information missing, SCM URL missing, Developer information missing
这是因为中央仓库的要求是比较严格的,你需要更新你的 POM 文件来更新必要的内容。

根据上面的提示,你需要在将所有内容提交到中央仓库之前更新你的 POM 文件。
针对 URL 和 Name。
可以针对项目的情况添加内容如下:
<name>CWIKIUS-OSSEZ Java Tutorials For Algorithm And Learning</name>
<url>https://www.isharkfly.com/</url>
如果你希望你的项目被分析到 OSSRH 仓库,并且被所有人使用的话。
下面的配置在 POM.xml 中必不可少。
否则你将没有办法提交到中央仓库中。
<name>CWIKIUS-OSSEZ Java Parent Modules</name>
<description>CWIKIUS-OSSEZ Java Tutorials For Algorithm And Learning</description>
<url>https://www.isharkfly.com/</url>
<scm>
<connection>https://github.com/cwiki-us-docs/java-tutorials.git</connection>
<url>https://github.com/cwiki-us-docs/java-tutorials.git</url>
</scm>
<developers>
<developer>
<name>YuCheng Hu</name>
<id>huyuchengus</id>
<email>[email protected]</email>
<timezone>-5</timezone>
<organization>NORTH TECOM, LLC</organization>
<roles>
<role>Java Developer</role>
</roles>
</developer>
</developers>
<licenses>
<license>
<name>Apache 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
很多时候我们可能不是非常关注版权信息,但是上面的内容是必不可少的。
当你完成所有的配置后,在部署,你会看到提示没有错误的部署信息。
你的部署将会被全世界人看到。
是不是有点激动呀。