Execution failed for task ':sonar'

I am currently working on upgrading a Kotlin Multiplatform project from Gradle 8.11.0 to 9.0.0. With the change to 9.0.0, I had to upgrade our sonar plugin version from 5.1.0.4882 to the latest version, 6.3.1.5724, as the 5.1 version was using a method that is no longer supported by Gradle 9.

With the bump to the latest plugin version, I am seeing the following error when the :sonar task runs in a CI/CD workflow:

Execution failed for task ':sonar'.
> 'org.apache.commons.compress.archivers.tar.TarArchiveEntry org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextEntry()'  

It looks like this has been an issue in the past: Execution failed for task ':app:sonar' - #4 by razortw

The only suggestion to fix the issue, was to downgrade to the 5.1.0.4882 version. I cannot do this however, as that version isn’t compatible with Gradle 9 like I mentioned.

Has there been any other resolution to this issue?

It seems like adding
skipJreProvisioning=true
to the Gradle task config resolved the issue

We are also seeing this issue. However, adding skipJreProvisioning=true does not fix it for us. It is also not possible for us to downgrade the plugin to 5.x.

We also tried to add an explicit dependency on org.apache.commons:commons-compress:1.27.0. However, this also does not work.

Any other ideas on how to fix this?

Hi @OscarSpruit,

Would you mind creating a new thread for this is with all your details, please?

 
Thx,
Ann

1 Like