使用Artifactory Gradle插件时,无法使Spring Boot的buildInfo()生效

时间:2016-09-27 02:20:10

标签: gradle spring-boot artifactory

  • Gradle:2.13
  • 开机:1.3.5
  • Artifactory Gradle Plugin(org.jfrog.buildinfo:build-info-extractor-gradle):4.5.0

该项目已经建设了一段时间。但是,现在我正在尝试通过/ info端点显示一些额外的构建信息,因此,根据the docs,我添加了:

springBoot {
    buildInfo()
}

现在似乎与Artifactory Gradle插件存在某种冲突:

Caused by: groovy.lang.GroovyRuntimeException: Could not find matching constructor for: org.jfrog.gradle.plugin.artifactory.dsl.DoubleDelegateWrapper(org.jfrog.build.extractor.clientConfiguration.ArtifactoryClientConfiguration$BuildInfoHandler)
    at org.jfrog.gradle.plugin.artifactory.dsl.ArtifactoryPluginConvention.buildInfo(ArtifactoryPluginConvention.groovy:64)
    at org.jfrog.gradle.plugin.artifactory.dsl.ArtifactoryPluginConvention.invokeMethod(ArtifactoryPluginConvention.groovy)
    at org.gradle.api.internal.BeanDynamicObject$GroovyObjectAdapter.invokeMethod(BeanDynamicObject.java:279)
    at org.gradle.api.internal.BeanDynamicObject.invokeMethod(BeanDynamicObject.java:130)
    at org.gradle.api.internal.plugins.DefaultConvention$ExtensionsDynamicObject.invokeMethod(DefaultConvention.java:212)
    at org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:150)
    at org.gradle.groovy.scripts.BasicScript.methodMissing(BasicScript.java:79)
    at build_do1tse3u3lgd8dbntr9ir9lk6$_run_closure5.doCall(/Users/jbisotti/sandbox/fusion/fusion-eureka-service/build.gradle:76)
    at org.gradle.api.internal.ClosureBackedAction.execute(ClosureBackedAction.java:67)
    at org.gradle.api.internal.plugins.ExtensionsStorage$ExtensionHolder.configure(ExtensionsStorage.java:145)
    at org.gradle.api.internal.plugins.ExtensionsStorage.configureExtension(ExtensionsStorage.java:69)
    at org.gradle.api.internal.plugins.DefaultConvention$ExtensionsDynamicObject.invokeMethod(DefaultConvention.java:207)
    at org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:150)
    at org.gradle.groovy.scripts.BasicScript.methodMissing(BasicScript.java:79)
    at build_do1tse3u3lgd8dbntr9ir9lk6.run(/Users/jbisotti/sandbox/fusion/fusion-eureka-service/build.gradle:75)
    at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:91)
    ... 50 more

我不确定三个嫌疑人中哪一个有过错,也不确定如何解决。任何帮助将不胜感激!

1 个答案:

答案 0 :(得分:2)

在Spring Boot 1.4.0之前,没有添加buildInfo()。 D'哦!