第一步创建项目并发布到github
第二部 创建账号 并新建问题
错误情况一
Do you own the domain fastboot.com? If so, please verify ownership via one of the following methods:
* Add a TXT record to your DNS referencing this JIRA ticket: OSSRH-55669 (Fastest)
* Setup a redirect to your Github page (if it does not already exist)
If you do not own this domain, please read:
http://central.sonatype.org/pages/choosing-your-coordinates.html
You may also choose a groupId that reflects your project hosting, in this case, something like
Would you like to use a free managed security reporting service (recommended)?
Put https://hackerone.com/central-security-project/reports/new as your project's security issue reporting URL. We'll take care of the rest.
For more details on the Central Security Project, visit
意思是groupid, 命名必须是自己的域名
自己有域名 两种认证方式 新建dns解析
将自己的网站重定向到github项目地址
还可以使用开源的代码托管平台
例如github
则 groupid 为 com.github.用户名
至此问题一解决
问题二,怎样证明此仓库是你的
please create a public repo called OSSRH-55669 to verify gitee account ownership
大概意思是创建一个项目名为OSSRH-55669 的项目,证明此仓库是你本人的
至此问题二解决
在pom文件中添加
<!-->开发者的信息<-->
<developers>
<developer>
<name>fastsite</name>
<email>fastsite@163.com</email>
</developer>
</developers>
<!-->项目的版本管理地址<-->
<scm>
<url>https://gitee.com/fastsite/fastsite</url>
</scm>
<!-->发布的地址<-->
<distributionManagement>
<repository>
<id>snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>
注意在编辑时设置字符集
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
</pluginManagement>
在 .m2/settings.xml 中添加用户名 密码
</servers>
<server>
<id>snapshots</id>
<username>上面注册时用户名</username>
<password>上面注册时密码</password>
</server>
</servers>
最后执行发布命令
mvn clean deploy
然后查看结果