Failed to upload report: The 'report' parameter is missing -> [Help 1]

When I run the command for the following command I got the following error:

mvn sonar:sonar -Dsonar.login=xx.

[INFO] Sensor Zero Coverage Sensor
[INFO] Sensor Zero Coverage Sensor (done) | time=37ms
[INFO] Sensor Java CPD Block Indexer
[INFO] Sensor Java CPD Block Indexer (done) | time=101ms
[INFO] SCM Publisher SCM provider for this project is: git
[INFO] SCM Publisher 104 source files to be analyzed
[INFO] SCM Publisher 103/104 source files have been analyzed (done) | time=651ms
[WARNING] Missing blame information for the following files:
[WARNING] * pom.xml
[WARNING] This may lead to missing/broken features in SonarQube

[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184:sonar (default-cli) on project api-backend: Failed to upload report: The ‘report’ parameter is missing → [Help 1]

What should I do ?

Thanks.

My parameters for the pom.xml

<properties>
		<java.version>17</java.version>
		
		<!-- JaCoCo Properties -->
		<jacoco.version>0.8.8</jacoco.version>
		<sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
		<sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
		<sonar.projectKey>${project.name}</sonar.projectKey>
		<sonar.jacoco.reportPath>${project.basedir}/../target/jacoco.exec</sonar.jacoco.reportPath>
		<sonar.language>java</sonar.language>
		<sonar.host.url>http://localhost:9000</sonar.host.url>
		<sonar.log.level>DEBUG</sonar.log.level>
    	<sonar.verbose>true</sonar.verbose>
		<sonar.sources>.</sonar.sources>
<!--	    <sonar.java.binaries>${project.basedir}/../target/classes</sonar.java.binaries> -->
		<sonar.jacoco.reportPath>${project.basedir}/../target/jacoco.exec</sonar.jacoco.reportPath>
		<sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
		<sonar.sourceEncoding>UTF-8</sonar.sourceEncoding>
		<sonar.exclusions>.project,.classpath,**/test/**/*,**/target/**/*</sonar.exclusions>
		<sonar.coverage.exclusions>**/*.js</sonar.coverage.exclusions>
		<sonar.java.source>17</sonar.java.source>

	</properties>

@ganncamp is there possibility taht you have a solution for this ? Thanks

Hi,

Please don’t @ people not already involved in your thread. Rest assured that all threads get looked at, and that @-ing someone doesn’t move you up the priority list. Just the opposite.

Can you provide the full analysis log?

As a side note on your parameters:

  • These do nothing:

    <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
    <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
    <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
    <sonar.language>java</sonar.language>
    

    (Note that you listed sonar.java.coveragePlugin twice)

  • These are read from your Maven env and don’t need to be set explicitly unless you’re overriding the defaults:

    <sonar.sources>.</sonar.sources>
    <sonar.java.binaries>${project.basedir}/../target/classes</sonar.java.binaries>
    

    (Note that you do seem to be overriding the default sources directory, but I’m not sure a value of . is wise)

  • This is only needed if you’re compiling to a lower Java version than you’re analyzing with: <sonar.java.source>17</sonar.java.source>

  • <sonar.jacoco.reportPath>${project.basedir}/../target/jacoco.exec</sonar.jacoco.reportPath>
    This is the wrong property name
    It points to an .exec file, which is no longer supported
    There’s no need to re-state the default path, but in fact, this path doesn’t look valid to me

  • These are basically redundant

    <sonar.log.level>DEBUG</sonar.log.level>
    <sonar.verbose>true</sonar.verbose>
    
  • If you had not overridden sonar.sources to ., you wouldn’t need these; <sonar.exclusions>.project,.classpath,**/test/**/*,**/target/**/*</sonar.exclusions>

 
Ann