2014-08-29 41 views
3

mvn deploy無法嘗試做時,我有一點問題的行家部署到Github上

我看到的錯誤是:

Expected data to be of type "object"; value was: nil. 

對於GitHub的網站插件。

這是完整的日誌:

[ERROR] 
[ERROR] Expected data to be of type "object"; value was: nil. 
[ERROR] Expected data to be of type "object"; value was: nil. (422) 
[ERROR] -> [Help 1] 
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.github:site-maven-plugin:0.9:site (default) on project abc: Error creating commit: Invalid request. 

Expected data to be of type "object"; value was: nil. 
Expected data to be of type "object"; value was: nil. (422) 
     at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216) 
     at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) 
     at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) 
     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108) 
     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76) 
     at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) 
     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116) 
     at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361) 
     at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155) 
     at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584) 
     at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213) 
     at org.apache.maven.cli.MavenCli.main(MavenCli.java:157) 
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
     at java.lang.reflect.Method.invoke(Method.java:483) 
     at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) 
     at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) 
     at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) 
     at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) 
Caused by: org.apache.maven.plugin.MojoExecutionException: Error creating commit: Invalid request. 

Expected data to be of type "object"; value was: nil. 
Expected data to be of type "object"; value was: nil. (422) 
     at com.github.maven.plugins.site.SiteMojo.execute(SiteMojo.java:440) 
     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133) 
     at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) 
     ... 19 more 
Caused by: org.eclipse.egit.github.core.client.RequestException: Invalid request. 

Expected data to be of type "object"; value was: nil. 
Expected data to be of type "object"; value was: nil. (422) 
     at org.eclipse.egit.github.core.client.GitHubClient.createException(GitHubClient.java:552) 
     at org.eclipse.egit.github.core.client.GitHubClient.sendJson(GitHubClient.java:643) 
     at org.eclipse.egit.github.core.client.GitHubClient.post(GitHubClient.java:757) 
     at org.eclipse.egit.github.core.service.DataService.createCommit(DataService.java:397) 
     at com.github.maven.plugins.site.SiteMojo.execute(SiteMojo.java:434) 
     ... 21 more 
[ERROR] 
[ERROR] Re-run Maven using the -X switch to enable full debug logging. 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles: 
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException 
+0

您應該使用'mvn site-deploy'來代替原因site-maven-plugin旨在爲該網站工作。 – khmarbaise 2014-08-29 06:52:06

+0

https://github.com/github/maven-plugins/issues/69有關於此的討論 – 2014-09-07 10:48:07

回答

4

由於最近的API更改而發生此錯誤。使用版本0.10-SNAPSHOT,直到最終版本發佈。

更多的細節和修復是在github問題中的described

更新
釋放0.10出去,所描述的錯誤被修正爲大多數用戶。 查詢issue瞭解更多信息。

+0

[錯誤]插件com.github.github:site-maven-plugin:0.10-SNAPSHOT或其某個依賴項無法解決方法:找不到工件com.github.github:site-maven-plugin:jar:0.10-SNAPSHOT – xybrek 2014-09-01 14:55:46

+0

你應該檢查一下代碼並自己構建它,或者添加sonatype快照存儲庫到你的pom中。 – Vadimo 2014-09-01 16:23:24

+0

我在https://oss.sonatype.org/content/groups/public/com/github/github/site-maven-plugin/ – xybrek 2014-09-02 00:52:11

1

從我可以告訴,這似乎是一個GitHub的API問題。這個插件在我最後一次使用它的時候工作得很好,現在它沒有。從0.8升級到0.9沒有任何區別。

2

由於2014年9月24日問題消失時GitHub的個人資料發生變化,有一個公共的e-mail地址和

<dependency> 
    <groupId>com.github.github</groupId> 
    <artifactId>site-maven-plugin</artifactId> 
    <version>0.10</version> 
</dependency> 

使用。請參閱討論https://github.com/github/maven-plugins/issues/69