我在尝试mvn deploy
我看到的错误是:
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 :(得分:4)
由于最近的API更改,发生此错误。使用版本0.10-SNAPSHOT直到最终版本发布。
github问题中有更多详细信息和修复described。
<强>更新强>:
版本0.10已经出来,并且对于大多数用户来说,所描述的错误是固定的。
查看issue以了解详情。
答案 1 :(得分:2)
自2014-09-24起,当github个人资料被更改并且有一个公共电子邮件地址时,问题就消失了
<dependency>
<groupId>com.github.github</groupId>
<artifactId>site-maven-plugin</artifactId>
<version>0.10</version>
</dependency>
答案 2 :(得分:1)
据我所知,这似乎是一个github api问题。这个插件在我最后一次使用时运行良好,现在却没有。从0.8升级到0.9没有任何区别。