java-使用Maven将jar上传到github失败
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了java-使用Maven将jar上传到github失败,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含3092字,纯文字阅读大概需要5分钟。
内容图文
![java-使用Maven将jar上传到github失败](/upload/InfoBanner/zyjiaocheng/664/efd4ceaeb0154dd69f405ea769cbd89a.jpg)
我尝试追踪:Hosting a Maven repository on github
我的POM.xml
<parent>
<artifactId>rf</artifactId>
<groupId>com.zlhades</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>rfcore</artifactId>
<properties>
<java-version>1.7</java-version>
<github.global.server>github</github.global.server>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>${java-version}</source>
<target>${java-version}</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>com.github.github</groupId>
<artifactId>site-maven-plugin</artifactId>
<version>0.12</version>
<configuration>
<message>Maven artifacts for ${project.version}</message> <!-- git commit message -->
<noJekyll>true</noJekyll> <!-- disable webpage processing -->
<outputDirectory>${project.build.directory}/mvn-repo</outputDirectory> <!-- matches distribution management repository url above -->
<branch>refs/heads/mvn-repo</branch> <!-- remote branch name -->
<includes><include>**/*</include></includes>
<repositoryName>RequestForward</repositoryName> <!-- github repo name -->
<repositoryOwner>zlhades</repositoryOwner> <!-- github username -->
</configuration>
<executions>
<!-- run site-maven-plugin's 'site' target as part of the build's normal 'deploy' phase -->
<execution>
<goals>
<goal>site</goal>
</goals>
<phase>deploy</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
<distributionManagement>
<repository>
<id>internal.repo</id>
<name>Temporary Staging Repository</name>
<url>file://${project.build.directory}/mvn-repo</url>
</repository>
</distributionManagement>
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>2.0.2-beta</version>
<scope>test</scope>
</dependency>
</dependencies>
而且我得到以下错误:
=========================log==========================
[ERROR] Failed to execute goal
com.github.github:site-maven-plugin:0.12:site (default) on project
rfcore: Error creating commit: Invalid request.[ERROR] For ‘properties/name’, nil is not a string.
[ERROR] For ‘properties/name’, nil is not a string. (422)
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
execute goal com.github.github:site-maven-plugin:0.12:site (default)
on project rfcore: Error creating commit: Invalid request.For ‘properties/name’, nil is not a string.
For ‘properties/name’, nil is not a string. (422)
=========================log==========================
如何解决这个问题?
解决方法:
谢谢,我找到了答案:
这篇文章底部的评论建议您需要在github个人资料中填写“真实姓名”字段,以避免出现此错误.
https://malalanayake.wordpress.com/2014/03/10/create-simple-maven-repository-on-github/
内容总结
以上是互联网集市为您收集整理的java-使用Maven将jar上传到github失败全部内容,希望文章能够帮你解决java-使用Maven将jar上传到github失败所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。