Gradle wont let me analyze my project

Hello good folks I need some advice.

I’ve been trying to use sonarqube to analyse one of my projects but something in gradle doesnt work.

I end up with the error: org.gradle.execution.TaskSelectionException: Task ‘.projectKey=summer_project’ not found in root project ‘SafetyFirstController’.
when trying to run the analysis with stacktrace.

Any advice is much appreciated.

Hello @help

run the following command

gradle tasks --all

and check if your task is listed there maybe you call it with typo or something

hope that help and have a nice day :slight_smile:

What does your gradle command line look like when doing the analysis? It appears that something is incorrect because a task named .projectKey=summer_project is being requested for execution.

Is there an extra space on the command line that’s splitting your attempt to set the sonar.projectKey property?

Apologies for the late reply, I’ve been talking to the fine people over at the sonar community and its lead me to a new issue. That being that the analysis is now unable to run with the following error:

1: Task failed with an exception.
-----------
* What went wrong:
Timeout waiting to lock jars (C:\Users\ossia\.gradle\caches\jars-9). It is currently in use by another Gradle instance.
Owner PID: 22616
Our PID: 20240
Owner Operation:
Our operation:
Lock file: C:\Users\ossia\.gradle\caches\jars-9\jars-9.lock

* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Exception is:
org.gradle.cache.LockTimeoutException: Timeout waiting to lock jars (C:\Users\ossia\.gradle\caches\jars-9). It is currently in use by another Gradle ins
tance.
Owner PID: 22616
Our PID: 20240
Owner Operation:
Our operation:

2: Task failed with an exception.
-----------
* What went wrong:
Timeout waiting to lock artifact cache (C:\Users\ossia\.gradle\caches\modules-2). It is currently in use by another Gradle instance.
Owner PID: 22616
Our PID: 20240
Owner Operation:
Our operation:
Lock file: C:\Users\ossia\.gradle\caches\modules-2\modules-2.lock

* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Exception is:
org.gradle.cache.LockTimeoutException: Timeout waiting to lock artifact cache (C:\Users\ossia\.gradle\caches\modules-2). It is currently in use by anoth
er Gradle instance.
Owner PID: 22616
Our PID: 20240
Owner Operation:
Our operation:

not sure if the following command would help or not

gradle --stop

this will stop the gradle daemon then go execute your command you want