Analysis with SonarQube causes 0 files to index and no reports (Maven project)

I have some problems using SonarQube on an external server. I've only been working with SonarQube for a couple of days and when I analyze my Maven project everything works fine. We are using Postgresql database. But there are some problems when I try to parse the project on the SonarQube external server.

Environment:

I am using SonarQube 4.4 and Maven 3.3. Please find my Maven settings.xml below.

  <profile>
        <id>sonar</id>
        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>
        <properties> 
            <sonar.jdbc.url>
              jdbc:postgresql://databaseadress/sonarqube?useUnicode=true&amp;characterEncoding=utf8
            </sonar.jdbc.url>
            <sonar.jdbc.username>username</sonar.jdbc.username>
            <sonar.jdbc.password>password</sonar.jdbc.password>                
            <sonar.host.url>
              http://hostAdress
            </sonar.host.url>
        </properties>
    </profile>

      

I have already added the correct database connection. I installed the SonarQoube server myself and the sonar.propterties parameters were changed correctly. The project is written in Java. While doing the analysis, it connects to the database and starts analyzing.

Problem:

If I analyze the project with help mvn sonar:sonar

, I get the following message:

... INFO: SonarQube Server 4.4 [INFO] [17: 07: 01.958] Load global settings
[INFO] [17: 07: 02.137] User cache: C: \ Users \ christian.braun.sonar \ cache
[INFO] [ 17: 07: 02.142] Install plugins
[INFO] [17: 07: 02.159] Install JDBC driver
[INFO] [17: 07: 02.163] Create a JDBC datasource for jdbc: postgresql: // databaseadress
/ sonarqube? UseUnicode = true & characterEncoding = utf8
[INFO] [17: 07: 02.229] Hibernate initialization
[INFO] [17: 07: 04.077] Loading technical debt model ...
[INFO] [17: 07: 04.089] Loading technical debt model debt: 12 ms
[INFO] [17: 07: 04.090] Load project settings
[INFO] [17: 07: 04.170] Apply project exceptions
[INFO] [17: 07: 04.257] ------------- Scanning TestMaven
[INFO] [17: 07: 04.259] Boot module settings
[INFO] [17: 07: 04.394] Boot rules ...
[INFO] [17: 07: 04.403] Execution of loading rules: 9 ms
[INFO] [17: 07: 04.415] Configuring Maven plugins
[INFO] [17: 07: 04.444] Compare with previous analysis (2014-09 -02)
[INFO] [17: 07: 04.445] Compare more than 30 days (2014-08-03, analysis 2014-09-02 15: 58: 02.965)
[INFO] [17: 07: 04.446] Quality shutter not configured ...
[INFO] [17: 07: 04.461] Base directory: E: \ WORKSPACE_TEST \ 1
[INFO] [17: 07: 04.461] Working directory: E: \ WORKSPACE_TEST \ 1 \ target \ sonar
[INFO] [17: 07: 04.461] Sources: E: \ WORKSPACE_TEST \ 1 \ src \ main \ java
[INFO] [17: 07: 04.461] Test drives: E: \ WORKSPACE_TEST \ 1 \ src \ test \ java
[INFO] [17: 07: 04.461] Binary drives: E: \ WORKSPACE_TEST \ 1 \ target \ classes
[ INFO] [17: 07: 04.461] Source encoding: windows-1252, default locale: de_DE
[INFO] [17: 07: 04.461] Index files
[INFO] [17: 07: 04.483] 0 indexed files
[INFO] [17 : 07: 04.486] QProfileSensor ...
[INFO] [17: 07: 04.495] QProfileSensor done: 9 ms
[INFO] [17: 07: 04.495] InitialOpenIssuesSensor ...
[INFO] [17: 07: 04.503 ] Sensor InitialOpenIssuesSensor done: 8 ms
[INFO] [17: 07: 04.503] Sensor ProjectLinksSensor ...
[INFO] [17: 07: 04.514] Sensor ProjectLinksSensor done: 11 ms
[INFO] [17: 07: 04.515] Sensor VersionEventsSensor ...
[INFO] [17: 07: 04.523] Sensor VersionEventsSensor done: 8 ms
[INFO] [17: 07: 04.523] Sensor FileHashSensor ...
[INFO] [ 17: 07: 04.524] FileHashSensor done: 1 ms
[INFO] [17: 07: 04.524] CpdSensor ...
[INFO] [17: 07: 04.524] CpdSensor done: 0 ms
[INFO] [17: 07 : 04.524] Maven sensor dependencies ...
[INFO] [17: 07: 04.554] Maven sensor dependency: 30ms
[INFO] [17: 07: 04.660] Decorators execution ...
[INFO] [17: 07: 04.740 ] Save results in database
[INFO] [17: 07: 04.782] ANALYSIS SUCCESSFUL, you can viewhttp://hostAdress/dashboard/index/1:1


[INFO] [17: 07: 04.879] Executing post-job class org.sonar.plugins.core.issue.notification.SendIssueNotificationsPostJob
[INFO] [17: 07: 04.880] Executing post-job class org.sonar.plugins.core .batch.IndexProjectPostJob
[INFO] [17: 07: 04.897] Execute post-job class org.sonar.plugins.dbcleaner.ProjectPurgePostJob
[INFO] [17: 07: 04.904] → Store one snapshot per day between 2014-08-05 and 2014-09-01
[INFO] [17: 07: 04.905] → Store one snapshot per week between 2013-09-03 and 2014-08-05
[INFO] [17: 07: 04.905] → Store one snapshot per month between 2009-09-08 and 2013-09-03
[INFO] [17: 07: 04.905] → Delete data before: 2009-09-08
[INFO] [17: 07: 04.908] → Clear TestMaven [id = 5]
[INFO] [17: 07: 04.911] <- Blank shot 9
[INFORMATION] ----------------------------------------------- -------------------------
[INFO] CREATE SUCCESS
[INFO] ----------------- ------------------------------ -------------------- -----
[INFO] Total time: 15.234 s
[INFO] End at address: 2014-09-02T17: 07: 04 + 02: 00
[INFO] Final memory: 14M / 76M
[INFO] ----- ------------------------------------------ -------- -----------------

Looks good at first glance, but Sonar can't find files. 0 files indexed When I look at SonarQube I find the project folder but there are no reports.

Question:

What could be the problem when Sonar is not indexing files? I read that missing sonar may have this problem, but SonarQube documentation says Sonar-Runner doesn't need to use Maven-Plugin. Just to be clear, the project is not on one machine like the sonarqueb. Does this relate to file indexing? Please consider that I am a complete newbie to SonarQube

Regards

Christian

+3


source to share


1 answer


So I fixed the problem. SonarQube simply lacked the necessary plugins. I haven't had to do this with SonarQube on my localhost. After installing them, settings->Update Center

everything worked fine. As I said, it was green error.



+5


source







All Articles