【问题标题】:Cannot publish grails plugin无法发布 grails 插件
【发布时间】:2014-10-31 08:14:27
【问题描述】:

我正在尝试发布新版本的 Spring Security OAuth2 Provider grails 插件 (2.0-RC1),它似乎可以正确上传工件(请参阅 here),但 grails.org 上的 plugin page 是未更新。这是发布的输出 - 老实说,我不确定如何处理错误:

~>grailsw publish-plugin --grailsCentral --stacktrace
| Plugin packaged grails-spring-security-oauth2-provider-2.0-RC2.zip
| Plugin packaged grails-spring-security-oauth2-provider-2.0-RC2.zip
| POM generated: target/pom.xml
Publishing to Grails Central
Publishing to http://grails.org/api/v1.0/publish/spring-security-oauth2-provider/2.0-RC2
| Error Failed to publish plugin: Could not read JSON: Can not deserialize instance of java.lang.String out of START_OBJECT token
 at [Source: sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@74f0437f; line: 1, column: 1]; nested exception is com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.lang.String out of START_OBJECT token
 at [Source: sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@74f0437f; line: 1, column: 1]

我正在使用发布插件版本 3.0.1 和 grails 2.3.8。我也在 Windows 7 x64 和 Java 7 x64 上。

【问题讨论】:

  • 这是完整的堆栈跟踪吗?你能截取那个变量并看看里面是什么吗?另外,可能在 grails.org 协议发生了变化,现在发布插件的所有问题。
  • 这是完整的堆栈跟踪(我使用过 --stacktrace、--full-stacktrace 和 --verbose,它们都给出了相同的消息)。我不确定变量实际上在哪里甚至开始查看这个,它并没有给我太多工作。我想我可以深入研究 PublishPlugin.groovy 脚本,但在我真正深入研究之前,我想看看是否有人有任何想法。

标签: grails grails-plugin


【解决方案1】:

终于花时间深入研究发布插件代码后找到了解决方案。问题实际上是我有一个更新版本的 rest-client-builder 覆盖了与发布插件捆绑的版本。我使用的是 2.0.1 版本而不是 1.0.3。

将 rest-client-builder 插件版本更改为 1.0.3 解决了该问题(使用发布插件 3.0.1)。

【讨论】:

    猜你喜欢
    • 2012-04-19
    • 1970-01-01
    • 2013-06-22
    • 1970-01-01
    • 2011-10-12
    • 2015-04-27
    • 2011-04-09
    • 1970-01-01
    • 2014-10-20
    相关资源
    最近更新 更多