SonarQube Eclipse
  1. SonarQube Eclipse
  2. SONARIDE-353

Feed the Findbugs auxiliary classpath with required directories containing java classes

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.1.1
    • Component/s: Java
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Let's say you have 2 projects A and B. Project A depends on project B.
      In project A there are:

      • projectA/src: contains .java
      • projectA/bin: contains .class compiled from projectA/src
      • projectA/lib: contains .jar added to the classpath

      In project B there are:

      • projectB/src: contains .java
      • projectB/bin: contains .class compiled from projectB/src
      • projectB/lib: contains .jar added to the classpath

      The final classpath of projectA is: projectA/bin/*.class, projectA/lib/*.jar, projectB/bin/*.class, projectB/lib/*.jar

      When doing in Eclipse a local Sonar analysis of project A we set the following properties:

      • sonar.sources=projectA/src
      • sonar.binaries=projectA/bin,projectB/bin
      • sonar.libraries=projectA/lib/*.jar,projectB/lib/*.jar

      whereas we should have :

      • sonar.sources=projectA/src
      • sonar.binaries=projectA/bin
      • sonar.libraries=projectA/lib/*.jar,projectB/lib/*.jar,projectB/bin

      But to fix this ticket we need first to fix SONARJAVA-110

        Issue Links

          Activity

          Hide
          Julien HENRY added a comment -

          In fact this is Sonar Runner that prevent us to pass sonar.librairies=projectB/bin because Sonar Runner wants a list of files or patterns matching at least a file.

          As a workaround I pass: sonar.librairies=projectB/bin/*.class after checking that there is at least one .class in the bin folder hierarchy.

          Show
          Julien HENRY added a comment - In fact this is Sonar Runner that prevent us to pass sonar.librairies=projectB/bin because Sonar Runner wants a list of files or patterns matching at least a file. As a workaround I pass: sonar.librairies=projectB/bin/*.class after checking that there is at least one .class in the bin folder hierarchy.
          Hide
          Julien HENRY added a comment -

          IT added

          Show
          Julien HENRY added a comment - IT added
          Hide
          Fabrice Bellingard added a comment - - edited

          This does not work: SONARPLUGINS-2775 must be fixed first.

          Show
          Fabrice Bellingard added a comment - - edited This does not work: SONARPLUGINS-2775 must be fixed first.
          Hide
          Fabrice Bellingard added a comment -

          Tested!

          Show
          Fabrice Bellingard added a comment - Tested!

            People

            • Assignee:
              Julien HENRY
              Reporter:
              Freddy Mallet
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: