我尝试遵循:在 github 上托管 Maven 存储库 https://stackoverflow.com/questions/14013644/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>
我收到以下错误:
=========================日志======================== ==
[错误] 未能执行目标
com.github.github:site-maven-plugin:0.12:项目上的站点(默认)
rfcore:创建提交时出错:请求无效。
[错误] 对于“属性/名称”,nil 不是字符串。
[错误] 对于“属性/名称”,nil 不是字符串。 (422)
[错误] -> [帮助 1]
org.apache.maven.lifecycle.LifecycleExecutionException:失败
执行目标 com.github.github:site-maven-plugin:0.12:site (默认)
在项目 rfcore 上:创建提交时出错:请求无效。
对于“properties/name”,nil 不是字符串。
对于“properties/name”,nil 不是字符串。 (422)
=========================日志======================== ==
如何解决这个问题?
谢谢,我找到了答案:
本文底部的评论建议您需要填写 github 个人资料中的真实姓名字段以避免此错误。
https://malalanayake.wordpress.com/2014/03/10/create-simple-maven-repository-on-github/ https://malalanayake.wordpress.com/2014/03/10/create-simple-maven-repository-on-github/
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)