提交jar到Maven仓库问题ReasonPhrase: Forbidden
@ 阿信sxq
先给出配置文件内容
1.pom.xml
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>cn.xsshome</groupId>
<artifactId>taip</artifactId>
<version>1.0.0</version>
<packaging>jar</packaging>
<url>http://maven.apache.org</url>
<description>taip</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
<licenses>
<license>
<name>The Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
<scm>
<url>https://gitee.com/xshuai/taip.git</url>
</scm>
<developers>
<developer>
<name>xiaoshuai</name>
<email>youngxiaoshuai@163.com</email>
<organization>xsshome</organization>
<organizationUrl>https://www.xsshome.cn</organizationUrl>
</developer>
</developers>
<dependencies> </dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<distributionManagement>
<snapshotRepository>
<id>taip</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</snapshotRepository>
<repository>
<id>taip</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
<extensions>true</extensions>
<configuration>
<serverId>taip</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
2.maven-settings.xml 用户名和密码确认无误。
https://issues.sonatype.org/
https://oss.sonatype.org/
用户名和密码登录这2个网站都正常
<servers>
<server>
<id>taip</id>
<username>xiaoshuai</username>
<password>mypwd</password>
</server>
</servers>
3.gpg查看也正常
gpg: key 86C21110EACF407B: "xiaoshuai <youngxiaoshuai@163.com>" not changed
gpg: Total number processed: 1
gpg: unchanged: 1
4.ISSUE网站状态
5.发布cmd返回的信息 错误提示:ReasonPhrase: Forbidden
[INFO] Building jar: E:workspacetaiptargettaip-1.0.0-javadoc.jar
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ taip ---
[INFO] Installing E:workspacetaiptargettaip-1.0.0.jar to E:repositorycnxsshometaip1.0.0tai
p-1.0.0.jar
[INFO] Installing E:workspacetaippom.xml to E:repositorycnxsshometaip1.0.0taip-1.0.0.pom
[INFO] Installing E:workspacetaiptargettaip-1.0.0-sources.jar to E:repositorycnxsshometaip1
.0.0taip-1.0.0-sources.jar
[INFO] Installing E:workspacetaiptargettaip-1.0.0-javadoc.jar to E:repositorycnxsshometaip1
.0.0taip-1.0.0-javadoc.jar
[INFO]
[INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ taip ---
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/cn/xsshome/taip/1.0.0/taip-1
.0.0.jar
Uploading: https://oss.sonatype.org/service/local/staging/deploy/maven2/cn/xsshome/taip/1.0.0/taip-1
.0.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.199 s
[INFO] Finished at: 2018-04-16T11:32:47+08:00
[INFO] Final Memory: 26M/300M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-depl
oy) on project taip: Failed to deploy artifacts: Could not transfer artifact cn.xsshome:taip
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
有时差的。你今天问了明天才能得到回复。你看我的这个问题采纳的答案。有我咨询和官方给的回复。
你在那儿问的,我都看见他们回复别,和审核我心的Issue,就是没回我的评论啊,兄弟指条明路.....
直接评论。反正应该是有时差的
还是直接在之前的Issue下评论?
好的,谢谢
https://my.oschina.net/xshuai/blog/1796570 整个流程博文
解决了呀。首先要确定密码是否正确。如果正确那就咨询官方人员。让给开权限。反正我是因为权限不足导致。你看1楼评论。我有说明解决方案
朋友解决了吗?怎么破的?