diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e1dcf30bf167bf3c0aca7e70bb275e43b126d125..a0bcf535b78b97c60306dc976244672ba420e396 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -679,12 +679,14 @@ scan-sonarqube:
   only:
     - master
   needs:
+    - build-java-lib
     - test-analyse-service
     - test-dashboard-service
     - test-data-service
     - test-metadata-service
     - test-search-service
   dependencies:
+    - build-java-lib
     - test-analyse-service
     - test-dashboard-service
     - test-data-service