首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >用maven将jar上传到github失败

用maven将jar上传到github失败
EN

Stack Overflow用户
提问于 2016-03-25 12:43:18
回答 1查看 1.1K关注 0票数 4

我试着跟随:Hosting a Maven repository on github

我的POM.xml

代码语言:javascript
复制
<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========================== 错误未能执行目标com.github.gizub:site plugin:0.12:site(默认) on project rfcore:错误创建提交:无效请求。 对于“properties/name”的错误,nil不是字符串。 对于“properties/name”的错误,nil不是字符串。(422) 错误->帮助1 org.apache.maven.lifecycle.LifecycleExecutionException:未能执行项目rfcore上的目标com.github.gizub:site plugin:0.12:site(默认):错误创建提交:无效请求。 对于“properties/name”,nil不是字符串。 对于“properties/name”,nil不是字符串。(422) =========================log==========================

如何解决这个问题?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-03-25 13:13:17

Thx,我找到了答案:这篇文章底部的评论建议你需要在你的github配置文件中填写Real字段来避免这个错误。

https://malalanayake.wordpress.com/2014/03/10/create-simple-maven-repository-on-github/

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/36220177

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档