Sonarlint Eclipse - Configure Binary directory for modules

297 views
Skip to first unread message

Paul Borgen

unread,
May 8, 2018, 8:56:50 AM5/8/18
to SonarLint
We have a project with many modules. For the most part all the binaries for each module are in the same directory. I get the below error message in the console from the sonarlint eclipse plugin. It would be nice if this directory could be configured. Below is how these properies are configured for the sonarscanner. Maybe the eclipse plugin could point to this file some how?

Note:
This binary directory can be configured with this property "sonar.java.binaries" when creating a ConnectedAnalysisConfiguration Object.

Error Message:
Binary directory '/my-module/bin/default' was not added because it was not found. Maybe you should enable auto build of your project.

sonar-project.properties:
my-module.sonar.java.libraries=build/sonarqube/libs/*
my-module.sonar.java.binaries=build/classes
my-module.sonar.java.sources=src/main/java
my-module.sonar.sources=src
my-module.sonar.exclusions=**/*IT.java,**/*TEST.java,**/*Test.java,**/src/it**,**/src/test**,**/gradle/wrapper**

Julien HENRY

unread,
May 14, 2018, 12:09:13 PM5/14/18
to Paul Borgen, SonarLint
Hi Paul,

SonarLint will collect project configuration based on Eclipse classpath configuration, and doesn't rely on scanner configuration like sonar-project.properties. Do you confirm you have /my-module/bin/default in Eclipse classpath?

Julien Henry | SonarSource

Developer

https://sonarsource.com


--
You received this message because you are subscribed to the Google Groups "SonarLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarlint+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarlint/cf438b45-2b9c-46b8-aabe-d06c3968f7f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Paul Borgen

unread,
May 14, 2018, 12:12:37 PM5/14/18
to SonarLint
This directory "/my-module/bin/default" does not exists. This directory "/my-module/bin/" does exists. The java .class files are in here "/my-module/bin/src/main"

This is a gradle project not sure if that influences anything.


On Monday, May 14, 2018 at 12:09:13 PM UTC-4, Julien HENRY wrote:
Hi Paul,

SonarLint will collect project configuration based on Eclipse classpath configuration, and doesn't rely on scanner configuration like sonar-project.properties. Do you confirm you have /my-module/bin/default in Eclipse classpath?

Julien Henry | SonarSource

Developer

https://sonarsource.com


2018-05-08 14:56 GMT+02:00 Paul Borgen <pbor...@gmail.com>:
We have a project with many modules. For the most part all the binaries for each module are in the same directory. I get the below error message in the console from the sonarlint eclipse plugin. It would be nice if this directory could be configured. Below is how these properies are configured for the sonarscanner. Maybe the eclipse plugin could point to this file some how?

Note:
This binary directory can be configured with this property "sonar.java.binaries" when creating a ConnectedAnalysisConfiguration Object.

Error Message:
Binary directory '/my-module/bin/default' was not added because it was not found. Maybe you should enable auto build of your project.

sonar-project.properties:
my-module.sonar.java.libraries=build/sonarqube/libs/*
my-module.sonar.java.binaries=build/classes
my-module.sonar.java.sources=src/main/java
my-module.sonar.sources=src
my-module.sonar.exclusions=**/*IT.java,**/*TEST.java,**/*Test.java,**/src/it**,**/src/test**,**/gradle/wrapper**

--
You received this message because you are subscribed to the Google Groups "SonarLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarlint+...@googlegroups.com.

Julien HENRY

unread,
May 14, 2018, 12:54:54 PM5/14/18
to Paul Borgen, SonarLint
OK, this is the default output folder configured in Eclipse classpath by BuildShip. The fact it is missing is not a big deal, we should probably not log as ERROR, but only in DEBUG.


Julien Henry | SonarSource

Developer

https://sonarsource.com


To unsubscribe from this group and stop receiving emails from it, send an email to sonarlint+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarlint/e97b27f3-41da-48d8-935b-2bcf497b8e8f%40googlegroups.com.

Paul Borgen

unread,
May 30, 2018, 9:25:17 AM5/30/18
to SonarLint
Is there a way to set this directory? I am just worried that the .class files are not being used by the scan based on this error message

Julien HENRY

unread,
Jun 11, 2018, 3:08:59 AM6/11/18
to Paul Borgen, SonarLint
Hi Paul,

There is no need to set the property manually (it will be unmanageable on the long run). Look at the SonarLint console in debug mode, but I'm quite sure both /my-module/bin/default and /my-module/bin are passed to sonar.java.binaries. Also note that this is not an error, but an INFO message.

++

Julien Henry | SonarSource

Developer

https://sonarsource.com


To unsubscribe from this group and stop receiving emails from it, send an email to sonarlint+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarlint/0c5ebdba-ef52-4e31-8b23-83ce14258300%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages