SonarQube scanning is failed with the ERROR: Caused by: Failed to index files Caused by: /app/localstorage/BuildAgent2/work/4b0ae3/src/project/WebApp/links/bash/root
I have tried to exclude the links directory with the option -Dsonar.exclusions=/links/
But the scan is failing at indexing level, i believe exclusion comes after indexing.
The symbolic link inside our project is referring to root ( links/ bash -> / ) and the sonarqube is failing here to perform indexing
[08:30:01] [Step 4/4] ERROR: Error during Sonar runner execution
[08:30:01] [Step 4/4] ERROR: Unable to execute Sonar
[08:30:01] [Step 4/4] ERROR: Caused by: Failed to index files
Thanks for your response Ann, i updated my exclusion with **/links/**/*.*
Still it is failed with the same error message.
I see in the debug log, sonarqube has expended all the links till it encountered this link, which is referring to root ( / )
[10:29:35][Step 3/4] 05:29:35.063 DEBUG - ‘src/project/WebApp/links/CORE_LOGWRITER/links/ant/LICENSE’ indexed with language ‘null’
[10:29:35][Step 3/4] 05:29:35.063 DEBUG - ‘src/project/WebApp/links/CORE_LOGWRITER/links/ant/NOTICE’ indexed with language ‘null’
[10:29:35][Step 3/4] 05:29:35.064 DEBUG - ‘src/project/WebApp/links/CORE_LOGWRITER/links/ant/README’ indexed with language ‘null’
[10:29:35][Step 3/4] 05:29:35.064 DEBUG - ‘src/project/WebApp/links/CORE_LOGWRITER/links/ant/WHATSNEW’ indexed with language ‘null’
[10:29:36][Step 3/4] INFO: ------------------------------------------------------------------------
[10:29:36][Step 3/4] INFO: EXECUTION FAILURE
[10:29:36][Step 3/4] INFO: ------------------------------------------------------------------------
[10:29:36][Step 3/4] Total time: 1:07.745s
[10:29:36][Step 3/4] Final Memory: 15M/491M
[10:29:36][Step 3/4] INFO: ------------------------------------------------------------------------
[10:29:36][Step 3/4] ERROR: Error during Sonar runner execution
[10:29:36][Step 3/4] ERROR: Unable to execute Sonar
[10:29:36][Step 3/4] ERROR: Caused by: Failed to index files
[10:29:36][Step 3/4] ERROR: Caused by: /app/localstorage/BuildAgent2/work/4f0ae3/src/project/WebApp/links/CORE_LOGWRITER/links/bash/root
[10:29:36][Step 3/4] ERROR:
[10:29:36][Step 3/4] ERROR: To see the full stack trace of the errors, re-run SonarQube Runner with the -e switch.
[10:29:36][Step 3/4] ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.
[10:29:36][Step 3/4] Process exited with code 1
[10:29:37][Step 3/4] Process exited with code 1 (Step: SonarQube Scan (SonarQube Runner))
[10:29:37][Step 3/4] Step SonarQube Scan (SonarQube Runner) failed