Reputation: 1
Using SonarQube 6.3.1 server, org.sonarsource.scanner.maven:sonar-maven-plugin:3.2 and 3.3.0.603, Apache Maven 3.5.0, Java version: 1.8.0_91, vendor: Oracle Corporation, running Fedora 25
Steps to reproduce:
Posting this error here as I'm not allowed to create issue sonarsource jira
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.2:sonar (default-cli) on project guava-parent: SonarQube is unable to analyze file : '/home/rsvoboda/tmp/guava/guava/src/com/google/common/util/concurrent/Monitor.java': org.sonar.java.model.expression.InternalPrefixUnaryExpression cannot be cast to org.sonar.plugins.java.api.tree.MethodInvocationTree -> [Help 1]
To me this is bug, I could get further using workaround: -Dsonar.exclusions=**/com/google/common/util/concurrent/Monitor.java
Upvotes: 0
Views: 181
Reputation: 190
I can confirm that update of SonarJava analyzer via updatecenter to the latest version (4.9) available helps. Thank you @benzonico for help.
Upvotes: 0
Reputation: 10833
As far as I can tell you are hitting this problem : https://jira.sonarsource.com/browse/SONARJAVA-2140 Which has been fixed in version 4.6 of SonarJava analyzer. (bundled version with SonarQube 6.3.1 is 4.5, consider upgrading it to latest version 4.9 at time of writing).
Upvotes: 0