[HAP-680] Jenkins Build Matrix fails with "Project uses the Artifactory Gradle Plugin" unchecked. Created: 11/Jan/16  Updated: 13/Mar/16  Resolved: 13/Mar/16

Status: Resolved
Project: Jenkins Artifactory Plug-in
Component/s: Gradle
Affects Version/s: 2.4.6
Fix Version/s: None

Type: Bug Priority: High
Reporter: Stanley Fong (Inactive) Assignee: Roman Gurevitch (Inactive)
Resolution: Not a Bug Votes: 0
Labels: None


 Description   

Problem - When the Artifactory Gradle Plugin checkbox is unchecked, Jenkins is to use the Jenkins Artifactory plugin to generate the buildinfo. This causes the matrix build to fail.

To Reproduce the problem -
Jenkins 1.596 or above
Jenkins Artifactory Plugin - 2.4.6
Gradle Artifactory Plugin - 4.0
Create a Jenkins Multi-configuration project
Use gradle-examples/4/gradle-example project from github/JFrogDev - the artifactoryPublish.skip = true
Uncheck the Artifactory Gradle Plugin in the Jenkins Artifactory Plug In
Do the matrix bulid.

Expected Result - build should succeed.
Actual Result - same as reported by customer - snippets from the logs

17:50:06.883 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
17:50:06.883 [ERROR] [org.gradle.BuildExceptionReporter]
17:50:06.883 [ERROR] [org.gradle.BuildExceptionReporter] * Where:
17:50:06.884 [ERROR] [org.gradle.BuildExceptionReporter] Build file '/var/jenkins_home/jobs/gradle_matrix/workspace/PLAT/linux/gradle-example/build.gradle' line: 27
17:50:06.884 [ERROR] [org.gradle.BuildExceptionReporter]
17:50:06.885 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
17:50:06.885 [ERROR] [org.gradle.BuildExceptionReporter] A problem occurred evaluating root project 'gradle-example'.
17:50:06.886 [ERROR] [org.gradle.BuildExceptionReporter] > Cannot cast object 'org.jfrog.gradle.plugin.artifactory.dsl.ArtifactoryPluginConvention@b29a18a' with class 'org.jfrog.gradle.plugin.artifactory.dsl.ArtifactoryPluginConvention' to class 'org.jfrog.gradle.plugin.artifactory.dsl.ArtifactoryPluginConvention'
17:50:06.887 [ERROR] [org.gradle.BuildExceptionReporter]
17:50:06.887 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:
17:50:06.888 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'gradle-example'.
17:50:06.896 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:54)
17:50:06.897 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:187)
17:50:06.897 [ERROR] [org.gradle.BuildExceptionReporter] at



 Comments   
Comment by Roman Gurevitch (Inactive) [ 13/Mar/16 ]

When Artifactory plugin is applied within Gradle build script the "Project uses the Artifactory Gradle Plugin" has to be checked.
If its not checked Artifactory Gradle plugin will be applied twice which will results with the failure above.

This is the desired behavior although the error could be more informative.

Generated at Wed Aug 12 01:39:12 UTC 2020 using Jira 8.5.3#805003-sha1:b4933e02eaff29a49114274fe59e1f99d9d963d7.