Hi I’ve looked through the archives and couldn’t find a solution to this one, doesn’t seem the other answers answered this one.
GitHub
Circle CI with Maven build
Tried both ./mvnw clean verify sonar:sonar
and
./mvnw clean verify sonar:sonar -Dsonar.projectKey=*key in sonar cloud url*
Java
Error observed:
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184:sonar (default-cli) on project myproject: Could not find a default branch to fall back on. -> [Help 1]
ganncamp
(G Ann Campbell)
March 8, 2023, 4:42pm
2
Hi,
Welcome to the community!
Could you provide the full analysis log?
Ann
You mean the build log from CircleCI? If not, where do I find this analysis log? Also if it helps, we have Sonar working find for our UI Angular codebase, and I notice that the SONAR_TOKEN
we were given in the Analyze a project with CircleCI
tutorial is different than what we used to setup the UI build.
ganncamp
(G Ann Campbell)
March 8, 2023, 5:47pm
4
Hi,
In your OP you provided a log snippet: the error message. I’m asking for that full log instead of just the error.
If you stepped through the UI wizard to set both of them up then it’s normal to have two different tokens, since (for simplicity) the UI has you create a new one for each project.
Ann
Ok thanks, well that’s the build log that may have some private data, can I give you the snippet you’re looking for?
ganncamp
(G Ann Campbell)
March 8, 2023, 6:43pm
6
Hi,
Please redact the log as necessary.
Ann
ganncamp
(G Ann Campbell)
March 9, 2023, 4:31pm
8
Hi,
Somehow your log omits the analysis command. It might be helpful to see what it is. Could you provide it, please? And already, I see this:
[INFO] Check ALM binding of project 'com.osc:oscauction'
[WARNING] Failed to check if project 'com.osc:oscauction' is bound
[INFO] Detected project binding: ERROR
It might be interesting to enable verbose logging (-Dsonar.verbose=true
on the analysis command line).
How did you initially create this project? Was it via the UI wizard?
Ann
Sure I can add that, I’ll do that now. Yes this was created from the UI wizard.
If you need the part where the Sonar plugin starts, here it is:
[INFO] --- sonar-maven-plugin:3.9.1.2184:sonar (default-cli) @ oscauction ---
Downloading from central: https://repo.maven.apache.org/maven2/org/sonarsource/scanner/api/sonar-scanner-api/2.16.2.588/sonar-scanner-api-2.16.2.588.pom
Progress (1): 4.1/5.2 kB
Progress (1): 5.2 kB
Downloaded from central: https://repo.maven.apache.org/maven2/org/sonarsource/scanner/api/sonar-scanner-api/2.16.2.588/sonar-scanner-api-2.16.2.588.pom (5.2 kB at 287 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/sonarsource/scanner/api/sonar-scanner-api-parent/2.16.2.588/sonar-scanner-api-parent-2.16.2.588.pom
Progress (1): 4.1/4.8 kB
Progress (1): 4.8 kB
Downloaded from central: https://repo.maven.apache.org/maven2/org/sonarsource/scanner/api/sonar-scanner-api-parent/2.16.2.588/sonar-scanner-api-parent-2.16.2.588.pom (4.8 kB at 684 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.2.1/plexus-utils-3.2.1.jar
Downloading from central: https://repo.maven.apache.org/maven2/org/sonarsource/scanner/api/sonar-scanner-api/2.16.2.588/sonar-scanner-api-2.16.2.588.jar
Progress (1): 4.1/262 kB
Progress (1): 8.2/262 kB
Progress (1): 12/262 kB
Progress (1): 16/262 kB
Progress (1): 20/262 kB
Progress (1): 25/262 kB
Progress (1): 29/262 kB
Progress (1): 33/262 kB
Progress (1): 37/262 kB
Progress (1): 41/262 kB
Progress (1): 45/262 kB
Progress (1): 49/262 kB
Progress (1): 53/262 kB
Progress (1): 57/262 kB
Progress (1): 61/262 kB
Progress (1): 66/262 kB
Progress (1): 70/262 kB
Progress (1): 74/262 kB
Progress (1): 78/262 kB
Progress (1): 82/262 kB
Progress (1): 86/262 kB
Progress (1): 90/262 kB
Progress (1): 94/262 kB
Progress (1): 98/262 kB
Progress (1): 102/262 kB
Progress (1): 106/262 kB
Progress (1): 111/262 kB
Progress (1): 115/262 kB
Progress (1): 119/262 kB
Progress (2): 119/262 kB | 4.1/625 kB
Progress (2): 123/262 kB | 4.1/625 kB
Progress (2): 123/262 kB | 8.2/625 kB
Progress (2): 127/262 kB | 8.2/625 kB
Progress (2): 127/262 kB | 12/625 kB
Progress (2): 131/262 kB | 12/625 kB
Progress (2): 131/262 kB | 16/625 kB
Progress (2): 135/262 kB | 16/625 kB
Progress (2): 135/262 kB | 20/625 kB
Progress (2): 139/262 kB | 20/625 kB
Progress (2): 139/262 kB | 25/625 kB
Progress (2): 143/262 kB | 25/625 kB
Progress (2): 143/262 kB | 29/625 kB
Progress (2): 147/262 kB | 29/625 kB
Progress (2): 147/262 kB | 33/625 kB
Progress (2): 152/262 kB | 33/625 kB
Progress (2): 156/262 kB | 33/625 kB
Progress (2): 160/262 kB | 33/625 kB
Progress (2): 160/262 kB | 37/625 kB
Progress (2): 164/262 kB | 37/625 kB
Progress (2): 164/262 kB | 41/625 kB
Progress (2): 164/262 kB | 45/625 kB
Progress (2): 164/262 kB | 49/625 kB
Progress (2): 168/262 kB | 49/625 kB
Progress (2): 172/262 kB | 49/625 kB
Progress (2): 176/262 kB | 49/625 kB
Progress (2): 176/262 kB | 53/625 kB
Progress (2): 180/262 kB | 53/625 kB
Progress (2): 180/262 kB | 57/625 kB
Progress (2): 180/262 kB | 61/625 kB
Progress (2): 180/262 kB | 66/625 kB
Progress (2): 184/262 kB | 66/625 kB
Progress (2): 188/262 kB | 66/625 kB
Progress (2): 193/262 kB | 66/625 kB
Progress (2): 197/262 kB | 66/625 kB
Progress (2): 197/262 kB | 70/625 kB
Progress (2): 197/262 kB | 74/625 kB
Progress (2): 197/262 kB | 78/625 kB
Progress (2): 201/262 kB | 78/625 kB
Progress (2): 201/262 kB | 82/625 kB
Progress (2): 205/262 kB | 82/625 kB
Progress (2): 209/262 kB | 82/625 kB
Progress (2): 213/262 kB | 82/625 kB
Progress (2): 213/262 kB | 86/625 kB
Progress (2): 213/262 kB | 90/625 kB
Progress (2): 213/262 kB | 94/625 kB
Progress (2): 217/262 kB | 94/625 kB
Progress (2): 217/262 kB | 98/625 kB
Progress (2): 217/262 kB | 102/625 kB
Progress (2): 221/262 kB | 102/625 kB
Progress (2): 221/262 kB | 106/625 kB
Progress (2): 225/262 kB | 106/625 kB
Progress (2): 225/262 kB | 111/625 kB
Progress (2): 229/262 kB | 111/625 kB
Progress (2): 229/262 kB | 115/625 kB
Progress (2): 233/262 kB | 115/625 kB
Progress (2): 238/262 kB | 115/625 kB
Progress (2): 242/262 kB | 115/625 kB
Progress (2): 246/262 kB | 115/625 kB
Progress (2): 246/262 kB | 119/625 kB
Progress (2): 246/262 kB | 123/625 kB
Progress (2): 250/262 kB | 123/625 kB
Progress (2): 250/262 kB | 127/625 kB
Progress (2): 254/262 kB | 127/625 kB
Progress (2): 254/262 kB | 131/625 kB
Progress (2): 258/262 kB | 131/625 kB
Progress (2): 262 kB | 131/625 kB
Progress (2): 262 kB | 135/625 kB
Progress (2): 262 kB | 139/625 kB
Progress (2): 262 kB | 143/625 kB
Progress (2): 262 kB | 147/625 kB
Progress (2): 262 kB | 152/625 kB
Progress (2): 262 kB | 156/625 kB
Progress (2): 262 kB | 160/625 kB
Progress (2): 262 kB | 164/625 kB
Progress (2): 262 kB | 168/625 kB
Progress (2): 262 kB | 172/625 kB
Progress (2): 262 kB | 176/625 kB
Progress (2): 262 kB | 180/625 kB
Progress (2): 262 kB | 184/625 kB
Progress (2): 262 kB | 188/625 kB
Progress (2): 262 kB | 193/625 kB
Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.2.1/plexus-utils-3.2.1.jar (262 kB at 12 MB/s)
Progress (1): 197/625 kB
Progress (1): 201/625 kB
Progress (1): 205/625 kB
Progress (1): 209/625 kB
Progress (1): 213/625 kB
Progress (1): 217/625 kB
Progress (1): 221/625 kB
Progress (1): 225/625 kB
Progress (1): 229/625 kB
Progress (1): 233/625 kB
Progress (1): 238/625 kB
Progress (1): 242/625 kB
Progress (1): 246/625 kB
Progress (1): 250/625 kB
Progress (1): 254/625 kB
Progress (1): 258/625 kB
Progress (1): 262/625 kB
Progress (1): 266/625 kB
Progress (1): 270/625 kB
Progress (1): 274/625 kB
Progress (1): 279/625 kB
Progress (1): 283/625 kB
Progress (1): 287/625 kB
Progress (1): 291/625 kB
Progress (1): 295/625 kB
Progress (1): 299/625 kB
Progress (1): 303/625 kB
Progress (1): 307/625 kB
Progress (1): 311/625 kB
Progress (1): 315/625 kB
Progress (1): 319/625 kB
Progress (1): 324/625 kB
Progress (1): 328/625 kB
Progress (1): 332/625 kB
Progress (1): 336/625 kB
Progress (1): 340/625 kB
Progress (1): 344/625 kB
Progress (1): 348/625 kB
Progress (1): 352/625 kB
Progress (1): 356/625 kB
Progress (1): 360/625 kB
Progress (1): 365/625 kB
Progress (1): 369/625 kB
Progress (1): 373/625 kB
Progress (1): 377/625 kB
Progress (1): 381/625 kB
Progress (1): 385/625 kB
Progress (1): 389/625 kB
Progress (1): 393/625 kB
Progress (1): 397/625 kB
Progress (1): 401/625 kB
Progress (1): 406/625 kB
Progress (1): 410/625 kB
Progress (1): 414/625 kB
Progress (1): 418/625 kB
Progress (1): 422/625 kB
Progress (1): 426/625 kB
Progress (1): 430/625 kB
Progress (1): 434/625 kB
Progress (1): 438/625 kB
Progress (1): 442/625 kB
Progress (1): 446/625 kB
Progress (1): 451/625 kB
Progress (1): 455/625 kB
Progress (1): 459/625 kB
Progress (1): 463/625 kB
Progress (1): 467/625 kB
Progress (1): 471/625 kB
Progress (1): 475/625 kB
Progress (1): 479/625 kB
Progress (1): 483/625 kB
Progress (1): 487/625 kB
Progress (1): 492/625 kB
Progress (1): 496/625 kB
Progress (1): 500/625 kB
Progress (1): 504/625 kB
Progress (1): 508/625 kB
Progress (1): 512/625 kB
Progress (1): 516/625 kB
Progress (1): 520/625 kB
Progress (1): 524/625 kB
Progress (1): 528/625 kB
Progress (1): 532/625 kB
Progress (1): 537/625 kB
Progress (1): 541/625 kB
Progress (1): 545/625 kB
Progress (1): 549/625 kB
Progress (1): 553/625 kB
Progress (1): 557/625 kB
Progress (1): 561/625 kB
Progress (1): 565/625 kB
Progress (1): 569/625 kB
Progress (1): 573/625 kB
Progress (1): 578/625 kB
Progress (1): 582/625 kB
Progress (1): 585/625 kB
Progress (1): 589/625 kB
Progress (1): 593/625 kB
Progress (1): 597/625 kB
Progress (1): 601/625 kB
Progress (1): 605/625 kB
Progress (1): 609/625 kB
Progress (1): 613/625 kB
Progress (1): 617/625 kB
Progress (1): 622/625 kB
Progress (1): 625 kB
Downloaded from central: https://repo.maven.apache.org/maven2/org/sonarsource/scanner/api/sonar-scanner-api/2.16.2.588/sonar-scanner-api-2.16.2.588.jar (625 kB at 12 MB/s)
[INFO] User cache: /root/.sonar/cache
[INFO] SonarQube version: 8.0.0.38913
[INFO] Default locale: "en", source code encoding: "UTF-8"
[INFO] Load global settings
[INFO] Load global settings (done) | time=539ms
[INFO] Server id: 1BD809FA-AWHW8ct9-T_TB3XqouNu
[INFO] User cache: /root/.sonar/cache
[INFO] Load/download plugins
[INFO] Load plugins index
[INFO] Load plugins index (done) | time=509ms
[INFO] Load/download plugins (done) | time=2578ms
[INFO] Loaded core extensions: developer-scanner
[INFO] Found an active CI vendor: 'CircleCI'
[INFO] Load project settings for component key: 'com.osc:oscauction'
[INFO] Process project properties
[INFO] Execute project builders
[INFO] Execute project builders (done) | time=2ms
[INFO] Project key: com.osc:oscauction
[INFO] Base dir: /root/project
[INFO] Working dir: /root/project/target/sonar
[INFO] Load project branches
[INFO] Load project branches (done) | time=471ms
[INFO] Check ALM binding of project 'com.osc:oscauction'
[INFO] Detected project binding: NONEXISTENT
[INFO] Check ALM binding of project 'com.osc:oscauction' (done) | time=474ms
[INFO] Load project pull requests
[INFO] Load project pull requests (done) | time=481ms
[INFO] Load branch configuration
[INFO] Auto-configuring pull request 284
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:08 min
[INFO] Finished at: 2023-03-09T16:50:27Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184:sonar (default-cli) on project oscauction: Unable to load component class org.sonar.scanner.scan.filesystem.InputComponentStore: Unable to load component interface org.sonar.scanner.scan.branch.BranchConfiguration: Could not find a default branch to fall back on. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Exited with code exit status 1
ganncamp
(G Ann Campbell)
March 9, 2023, 7:28pm
11
Hi,
I think I saw that in the log already. I was looking for the actual analysis command. Something like
mvn sonar:sonar [args]
or perhaps
mvn sonar-maven-plugin:3.9.1.2184:sonar [args]
Ann
Oh. Build attached.
build-verbose.txt.zip (37.9 KB)
Also here’s a screenshot of the command running
ganncamp
(G Ann Campbell)
March 10, 2023, 2:02pm
13
Hi,
I’m not sure what’s going on, but that isn’t a verbose analysis log.
Ann
That’s the complete log from Circleci is there anything else I can give you?
ganncamp
(G Ann Campbell)
March 10, 2023, 2:35pm
15
Hi,
Either there’s a mismatch between the command you screenshotted and the log you sent me (different job) or there’s a mismatch between your screenshot and the command that actually ran.
I’m looking for a verbose log to either confirm or dismiss my theory that this is fundamentally a permissions problem. The other thing you could do is start double-checking all your permission tokens, both analysis and GitHub.
Ann
Nope it’s the log from the Screenshot. It could be a permissions issue I’ll double check. I’ve noticed reading this forum that this seems to be a generic error message, better messages would be invaluable right now.
1 Like