Affects Version/s: 7.9.1
Fix Version/s: 8.0
When building SQ from the source of a released version downloaded from https://github.com/SonarSource/sonarqube/releases, the build succeeds but SQ fails at startup with the error such as the following:
The cause if the following piece of code in `gradle.build` of module `sonar-plugin-api`:
When version is not a snapshot, buildVersion is made of 3 digits concatenated with the value of system property `buildNumber`. This system property is set when building on Travis or CirrusCI, but it is not on the user's machine. The result is that `buildNumber` value has the `null` string as buildNumber and this makes parsing of the version fail at SQ's startup.
Download a release zip from this repository : https://github.com/SonarSource/sonarqube/releases
Execute a ./gradlew build on it
Unzip the created zip in \sonar-application\build\distributions
Launch the wanted binary (for me it was StartSonar.bat on windows-x86-64
Error should occur.
Define system property buildNumber to value 0 when building:
In file sonar-plugin-api/build.gradle, replace the line: