Uploaded image for project: 'Bamboo Artifactory Plug-in'
  1. Bamboo Artifactory Plug-in
  2. BAP-432

Bamboo artifactory plugin fails with Gradle 4.7

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4.1
    • Fix Version/s: 2.5.0
    • Environment:
      • Bamboo version 6.4.0 build 60404
      • Artifactory Version 5.9.1
      • gradle wrapper with gradle 4.7
      • Linux build agent (same problem also with Windows agent)
      • Java 8

      Description

      After upgrading gradle to version 4.7 the bamboo build fails due to a UnsupportedOperationException. See stacktrace below:

      error 18-Apr-2018 16:17:39 FAILURE: Build failed with an exception. error 18-Apr-2018 16:17:39 error 18-Apr-2018 16:17:39 * Where: error 18-Apr-2018 16:17:39 Initialization script '/tmp/artifactory.init.script2339382655360837976gradle' line: 14 error 18-Apr-2018 16:17:39 error 18-Apr-2018 16:17:39 * What went wrong: error 18-Apr-2018 16:17:39 java.lang.UnsupportedOperationException (no error message) error 18-Apr-2018 16:17:39 error 18-Apr-2018 16:17:39 * Try: error 18-Apr-2018 16:17:39 Run with --info or --debug option to get more log output. Run with --scan to get full insights. error 18-Apr-2018 16:17:39 error 18-Apr-2018 16:17:39 * Exception is: error 18-Apr-2018 16:17:39 java.lang.UnsupportedOperationException error 18-Apr-2018 16:17:39 at com.google.common.collect.ImmutableMap.put(ImmutableMap.java:326) error 18-Apr-2018 16:17:39 at com.google.common.collect.BiMap$put.call(Unknown Source) error 18-Apr-2018 16:17:39 at BuildInfoPluginListener.projectsLoaded(/tmp/artifactory.init.script2339382655360837976gradle:14) error 18-Apr-2018 16:17:39 at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35) error 18-Apr-2018 16:17:39 at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) error 18-Apr-2018 16:17:39 at org.gradle.internal.event.DefaultListenerManager$ListenerDetails.dispatch(DefaultListenerManager.java:370) error 18-Apr-2018 16:17:39 at org.gradle.internal.event.DefaultListenerManager$ListenerDetails.dispatch(DefaultListenerManager.java:352) error 18-Apr-2018 16:17:39 at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:58) error 18-Apr-2018 16:17:39 at org.gradle.internal.event.DefaultListenerManager$EventBroadcast$ListenerDispatch.dispatch(DefaultListenerManager.java:340) error 18-Apr-2018 16:17:39 at org.gradle.internal.event.DefaultListenerManager$EventBroadcast$ListenerDispatch.dispatch(DefaultListenerManager.java:327) error 18-Apr-2018 16:17:39 at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:42) error 18-Apr-2018 16:17:39 at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:230) error 18-Apr-2018 16:17:39 at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:149) error 18-Apr-2018 16:17:39 at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:58) error 18-Apr-2018 16:17:39 at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:324) error 18-Apr-2018 16:17:39 at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:234) error 18-Apr-2018 16:17:39 at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:140) error 18-Apr-2018 16:17:39 at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:37) error 18-Apr-2018 16:17:39 at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93) error 18-Apr-2018 16:17:39 at com.sun.proxy.$Proxy15.projectsLoaded(Unknown Source) error 18-Apr-2018 16:17:39 at org.gradle.initialization.NotifyingBuildLoader.load(NotifyingBuildLoader.java:65) error 18-Apr-2018 16:17:39 at org.gradle.initialization.DefaultGradleLauncher$ConfigureBuild.run(DefaultGradleLauncher.java:260) error 18-Apr-2018 16:17:39 at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:317) error 18-Apr-2018 16:17:39 at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:309) error 18-Apr-2018 16:17:39 at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:185) error 18-Apr-2018 16:17:39 at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:97) error 18-Apr-2018 16:17:39 at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31) error 18-Apr-2018 16:17:39 at org.gradle.initialization.DefaultGradleLauncher.configureBuild(DefaultGradleLauncher.java:173) error 18-Apr-2018 16:17:39 at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:132) error 18-Apr-2018 16:17:39 at org.gradle.initialization.DefaultGradleLauncher.executeTasks(DefaultGradleLauncher.java:115) error 18-Apr-2018 16:17:39 at org.gradle.internal.invocation.GradleBuildController$1.call(GradleBuildController.java:78) error 18-Apr-2018 16:17:39 at org.gradle.internal.invocation.GradleBuildController$1.call(GradleBuildController.java:75) error 18-Apr-2018 16:17:39 at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:152) error 18-Apr-2018 16:17:39 at org.gradle.internal.work.StopShieldingWorkerLeaseService.withLocks(StopShieldingWorkerLeaseService.java:38) error 18-Apr-2018 16:17:39 at org.gradle.internal.invocation.GradleBuildController.doBuild(GradleBuildController.java:100) error 18-Apr-2018 16:17:39 at org.gradle.internal.invocation.GradleBuildController.run(GradleBuildController.java:75) error 18-Apr-2018 16:17:39 at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28) error 18-Apr-2018 16:17:39 at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35) error 18-Apr-2018 16:17:39 at org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.java:32) error 18-Apr-2018 16:17:39 at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.run(RunAsBuildOperationBuildActionRunner.java:45) error 18-Apr-2018 16:17:39 at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:317) error 18-Apr-2018 16:17:39 at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:309) error 18-Apr-2018 16:17:39 at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:185) error 18-Apr-2018 16:17:39 at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:97) error 18-Apr-2018 16:17:39 at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31) error 18-Apr-2018 16:17:39 at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.java:42) error 18-Apr-2018 16:17:39 at org.gradle.tooling.internal.provider.SubscribableBuildActionRunner.run(SubscribableBuildActionRunner.java:51) error 18-Apr-2018 16:17:39 at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:47) error 18-Apr-2018 16:17:39 at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:31) error 18-Apr-2018 16:17:39 at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:39) error 18-Apr-2018 16:17:39 at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:25) error 18-Apr-2018 16:17:39 at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:80) error 18-Apr-2018 16:17:39 at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:53) error 18-Apr-2018 16:17:39 at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:61) error 18-Apr-2018 16:17:39 at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:34) error 18-Apr-2018 16:17:39 at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:36) error 18-Apr-2018 16:17:39 at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:25) error 18-Apr-2018 16:17:39 at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:43) error 18-Apr-2018 16:17:39 at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:29) error 18-Apr-2018 16:17:39 at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:64) error 18-Apr-2018 16:17:39 at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:29) error 18-Apr-2018 16:17:39 at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:59) error 18-Apr-2018 16:17:39 at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:44) error 18-Apr-2018 16:17:39 at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:46) error 18-Apr-2018 16:17:39 at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:30) error 18-Apr-2018 16:17:39 at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67) error 18-Apr-2018 16:17:39 at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) error 18-Apr-2018 16:17:39 at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) error 18-Apr-2018 16:17:39 at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37) error 18-Apr-2018 16:17:39 at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) error 18-Apr-2018 16:17:39 at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26) error 18-Apr-2018 16:17:39 at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) error 18-Apr-2018 16:17:39 at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34) error 18-Apr-2018 16:17:39 at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) error 18-Apr-2018 16:17:39 at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74) error 18-Apr-2018 16:17:39 at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72) error 18-Apr-2018 16:17:39 at org.gradle.util.Swapper.swap(Swapper.java:38) error 18-Apr-2018 16:17:39 at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72) error 18-Apr-2018 16:17:39 at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) error 18-Apr-2018 16:17:39 at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:50) error 18-Apr-2018 16:17:39 at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) error 18-Apr-2018 16:17:39 at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:62) error 18-Apr-2018 16:17:39 at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) error 18-Apr-2018 16:17:39 at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) error 18-Apr-2018 16:17:39 at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:82) error 18-Apr-2018 16:17:39 at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) error 18-Apr-2018 16:17:39 at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) error 18-Apr-2018 16:17:39 at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50) error 18-Apr-2018 16:17:39 at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:295) error 18-Apr-2018 16:17:39 at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63) error 18-Apr-2018 16:17:39 at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46) error 18-Apr-2018 16:17:39 at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55) error 18-Apr-2018 16:17:39 error 18-Apr-2018 16:17:39 error 18-Apr-2018 16:17:39 * Get more help at https://help.gradle.org build 18-Apr-2018 16:17:39 build 18-Apr-2018 16:17:39 BUILD FAILED in 9s

       

      Here is the content of the temporary file "artifactory.init.script2339382655360837976gradle" referenced in the stacktrace above:

      import org.jfrog.gradle.plugin.artifactory.ArtifactoryPlugin
      import org.jfrog.gradle.plugin.artifactory.task.ArtifactoryTask

      initscript {
          dependencies

      {         classpath fileTree('/bamboo-agent-home/xml-data/build-dir/org.jfrog.bamboo.bamboo-artifactory-plugin-2.4.1/artifactoryGradleBuilder')     }

      }

      addListener(new BuildInfoPluginListener())
      class BuildInfoPluginListener extends BuildAdapter {

          def void projectsLoaded(Gradle gradle) {
              gradle.startParameter.getProjectProperties().put("build.start", Long.toString(System.currentTimeMillis()))
              Project root = gradle.getRootProject()
              root.logger.debug("Artifactory plugin: projectsEvaluated: ${root.name}")
              if (!"buildSrc".equals(root.name)) {
                  root.allprojects {
                      apply

      {                     apply plugin: ArtifactoryPlugin                 }

                  }
              }

              // Set the "archives" configuration to all Artifactory tasks.
              for (Project p : root.getAllprojects()) {
                  Task t = p.getTasks().findByName(ArtifactoryTask.ARTIFACTORY_PUBLISH_TASK_NAME)
                  if (t != null)

      {                 ArtifactoryTask task = (ArtifactoryTask)t                 task.setAddArchivesConfigToTask(true)             }

              }
          }
      }

       

      The only workaround at the moment is to downgrade gradle back to 4.6 but this workaround will only work until we switch to java 10 (which needs gradle 4.7). So the problem has priority Minor at the moment but will change to Blocker when we start switching to Java 10.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                barb Bar Belity
                Reporter:
                mschenk74 Manfred Schenk
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: