3

私はアーティファクトとチームシティが初めてです。gradle-artifactory プラグインを使ってみました。しかし、それは私に次のエラーを投げています..誰でもこのエラーが何であるかを教えて、解決策を手伝ってもらえますか.

Error is 
  Caused by: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'org.jfrog.gradle.plugin.artifactory.dsl.ArtifactoryPluginConvention@9bb457' with class 'org.jfrog.gradle.plugin.artifactory.dsl.ArtifactoryPluginConvention' to class 'org.jfrog.gradle.plugin.artifactory.dsl.ArtifactoryPluginConvention'

私のbuild.gradleは

buildscript {
repositories {
    maven {
        url "http://repo.jfrog.org/artifactory/gradle"
    }
    dependencies {
        classpath(group: 'org.jfrog.buildinfo', name: 'build-info-extractor-gradle', version: '2.0.12')
    }
}   
}

   apply plugin: 'artifactory'
   artifactoryPublish.skip = true

私のgradleバージョンは次のとおりです:gradle-1.0-milestone-8a

stackTrace is :

             [Gradle failure report] 
        [12:19:31][Gradle failure report] FAILURE: Build failed with an exception.
        [12:19:31][Gradle failure report] 
        [12:19:31][Gradle failure report] * Where:
        [12:19:31][Gradle failure report] Build file 'D:\Installations\Teamcity-7.1\TeamCity\buildAgent\work\5c4a802802673aca\account\build.gradle' line: 13
        [12:19:31][Gradle failure report] 
        [12:19:31][Gradle failure report] * What went wrong:
        [12:19:31][Gradle failure report] A problem occurred evaluating root project 'account'.
        [12:19:31][Gradle failure report] > Cannot cast object 'org.jfrog.gradle.plugin.artifactory.dsl.ArtifactoryPluginConvention@346762' with class 'org.jfrog.gradle.plugin.artifactory.dsl.ArtifactoryPluginConvention' to class 'org.jfrog.gradle.plugin.artifactory.dsl.ArtifactoryPluginConvention'
        [12:19:31][Gradle failure report] 
        [12:19:31][Gradle failure report] * Try:
        [12:19:31][Gradle failure report] Run with --info or --debug option to get more log output.
        [12:19:31][Gradle failure report] 
        [12:19:31][Gradle failure report] * Exception is:
        [12:19:31][Gradle failure report] org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'account'.
        [12:19:31][Gradle failure report]   at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:54)
        [12:19:31][Gradle failure report]   at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:127)
        [12:19:31][Gradle failure report]   at org.gradle.configuration.BuildScriptProcessor.evaluate(BuildScriptProcessor.java:38)
        [12:19:31][Gradle failure report]   at org.gradle.configuration.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:43)
        [12:19:31][Gradle failure report]   at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:462)
        [12:19:31][Gradle failure report]   at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:74)
        [12:19:31][Gradle failure report]   at org.gradle.configuration.ProjectEvaluationConfigurer.execute(ProjectEvaluationConfigurer.java:23)
        [12:19:31][Gradle failure report]   at org.gradle.configuration.ProjectEvaluationConfigurer.execute(ProjectEvaluationConfigurer.java:21)
        [12:19:31][Gradle failure report]   at org.gradle.configuration.DefaultBuildConfigurer$1.execute(DefaultBuildConfigurer.java:38)
        [12:19:31][Gradle failure report]   at org.gradle.configuration.DefaultBuildConfigurer$1.execute(DefaultBuildConfigurer.java:35)
        [12:19:31][Gradle failure report]   at org.gradle.api.internal.project.AbstractProject.configure(AbstractProject.java:438)
        [12:19:31][Gradle failure report]   at org.gradle.api.internal.project.AbstractProject.allprojects(AbstractProject.java:433)
        [12:19:31][Gradle failure report]   at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:35)
        [12:19:31][Gradle failure report]   at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:139)
        [12:19:31][Gradle failure report]   at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:110)
        [12:19:31][Gradle failure report]   at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:78)
        [12:19:31][Gradle failure report]   at org.gradle.launcher.cli.RunBuildAction.execute(RunBuildAction.java:42)
        [12:19:31][Gradle failure report]   at org.gradle.launcher.cli.RunBuildAction.execute(RunBuildAction.java:28)
        [12:19:31][Gradle failure report]   at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:201)
        [12:19:31][Gradle failure report]   at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:174)
        [12:19:31][Gradle failure report]   at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:170)
        [12:19:31][Gradle failure report]   at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139)
        [12:19:31][Gradle failure report]   at org.gradle.launcher.exec.ExceptionReportingAction.execute(ExceptionReportingAction.java:31)
        [12:19:31][Gradle failure report]   at org.gradle.launcher.exec.ExceptionReportingAction.execute(ExceptionReportingAction.java:20)
        [12:19:31][Gradle failure report]   at org.gradle.launcher.Main.doAction(Main.java:48)
        [12:19:31][Gradle failure report]   at org.gradle.launcher.exec.EntryPoint.run(EntryPoint.java:45)
        [12:19:31][Gradle failure report]   at org.gradle.launcher.Main.main(Main.java:39)
        [12:19:31][Gradle failure report]   at org.gradle.launcher.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
        [12:19:31][Gradle failure report]   at org.gradle.launcher.ProcessBootstrap.run(ProcessBootstrap.java:32)
        [12:19:31][Gradle failure report]   at org.gradle.launcher.GradleMain.main(GradleMain.java:24)
        [12:19:31][Gradle failure report] Caused by: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'org.jfrog.gradle.plugin.artifactory.dsl.ArtifactoryPluginConvention@346762' with class 'org.jfrog.gradle.plugin.artifactory.dsl.ArtifactoryPluginConvention' to class 'org.jfrog.gradle.plugin.artifactory.dsl.ArtifactoryPluginConvention'
        [12:19:31][Gradle failure report]   at org.jfrog.gradle.plugin.artifactory.ArtifactoryPlugin.getArtifactoryPluginConvention(ArtifactoryPlugin.groovy:126)
        [12:19:31][Gradle failure report]   at org.jfrog.gradle.plugin.artifactory.ArtifactoryPlugin$getArtifactoryPluginConvention.callCurrent(Unknown Source)
        [12:19:31][Gradle failure report]   at org.jfrog.gradle.plugin.artifactory.ArtifactoryPlugin.apply(ArtifactoryPlugin.groovy:43)
        [12:19:31][Gradle failure report]   at org.jfrog.gradle.plugin.artifactory.ArtifactoryPlugin.apply(ArtifactoryPlugin.groovy)
        [12:19:31][Gradle failure report]   at org.gradle.api.internal.plugins.DefaultProjectsPluginContainer.providePlugin(DefaultProjectsPluginContainer.java:107)
        [12:19:31][Gradle failure report]   at org.gradle.api.internal.plugins.DefaultProjectsPluginContainer.addPluginInternal(DefaultProjectsPluginContainer.java:71)
        [12:19:31][Gradle failure report]   at org.gradle.api.internal.plugins.DefaultProjectsPluginContainer.apply(DefaultProjectsPluginContainer.java:37)
        [12:19:31][Gradle failure report]   at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.applyPlugin(DefaultObjectConfigurationAction.java:101)
        [12:19:31][Gradle failure report]   at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.access$200(DefaultObjectConfigurationAction.java:32)
        [12:19:31][Gradle failure report]   at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction$3.run(DefaultObjectConfigurationAction.java:72)
        [12:19:31][Gradle failure report]   at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.execute(DefaultObjectConfigurationAction.java:114)
        [12:19:31][Gradle failure report]   at org.gradle.api.internal.project.AbstractProject.apply(AbstractProject.java:840)
        [12:19:31][Gradle failure report]   at org.gradle.api.Project$apply.call(Unknown Source)
        [12:19:31][Gradle failure report]   at org.gradle.api.internal.project.ProjectScript.apply(ProjectScript.groovy:34)
        [12:19:31][Gradle failure report]   at org.gradle.api.Script$apply.callCurrent(Unknown Source)
        [12:19:31][Gradle failure report]   at build_1u57rmsd94d5nc5gifnrrhi5j6.run(D:\Installations\Teamcity-7.1\TeamCity\buildAgent\work\5c4a802802673aca\account\build.gradle:13)
        [12:19:31][Gradle failure report]   at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:52)
        [12:19:31][Gradle failure report]   ... 29 more
        [12:19:31][Gradle failure report] 

teamcity 7.1 を使用してビルドを実行しています

4

3 に答える 3

4

わかりました:) 実際にartifactoryプラグインを使用するプロジェクトを実行する際に、「プロジェクトはArtifactory Gradleプラグインを使用する」チェックボックスが選択されていることを確認してください。

于 2013-03-04T18:39:37.790 に答える
0

クラスの読み込みに問題があるようです。プラグインのバージョンは、使用しているGradleのバージョンと互換性がない可能性があります。プラグインの作成者に尋ねることをお勧めします。また、Gradleのバージョンと完全なスタックトレース()を知らせます-S

于 2012-09-16T21:49:01.713 に答える
0

ジェンキンスでジョブを実行する際にこの問題がある場合、問題はジェンキンスのバグが原因である可能性があります: https://issues.jenkins-ci.org/browse/JENKINS-16603

私の場合の回避策は、バグ報告者が示唆したように --init-script 引数を削除することでした。

于 2015-06-23T06:02:30.503 に答える