Unable to enforce file exclusions against Maven

I am trying to enforce file exclusions against a package in a Master BASELINE execution. I have specified the package to be excluded as: **/bo/**/* and src/main/java/com/esrx/services/auth/bo/ . I have the following permissions:

Groups

  • GitHubEnterpriseDeveloper
  • GitHubEnterpriseReadOnly
  • sonar-users

The problem is this. When I run a BASELINE against MASTER packages are being pulled in that do not even exist in the MASTER repo - they exist in child branches that DO NOT need to be included; they have not even been committed to DEVELOP. They are not pulled into IntelliJ on either branch and cannot be corrected there. They exist in src/main/java/com/esrx/services/auth/bo/ , a package that still has development work going on in another branch.

When I run a BASELINE against MASTER with Exclusions defined I get the following error:

[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.6.0.1398:sonar (default-cli) on project cws-auth-app: Unable to load component class org.sonar.scanner.bootstrap.ScannerPluginInstaller: Unable to load component class org.sonar.scanner.bootstrap.PluginFiles: Unable to load component class org.sonar.scanner.bootstrap.GlobalConfiguration: Unable to load component class org.sonar.scanner.bootstrap.GlobalServerSettings: Not authorized. Please check the properties sonar.login and sonar.password. → [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.6.0.1398:sonar (default-cli) on project cws-auth-app: Unable to load component class org.sonar.scanner.bootstrap.ScannerPluginInstaller .

Any help is greatly appreciated!

Hi,

Welcome to the community!

The error you’re getting is an auth error; nothing to do with what is/is not included in analysis. I guess you need to add -Dsonar.login=[auth token] to your Maven command line.

With regard to what’s in what branch… SonarQube analyzes the code you point it at. If you’ve got BASELINE checked out & run analysis, you’re going to get an analysis of BASELINE. Ditto MASTER.

 
:woman_shrugging:
Ann

1 Like

Problem solved – thanks!

1 Like