1

Linuxマシンにソナーをインストールし、mysqlサーバーを構成しました。

ソナーサイトからサンプルプロジェクトをダウンロード

  1. .m2フォルダーのsettings.xmlにソナーの詳細を追加しました
  2. mvn clean install - ビルド成功
  3. ソナー:ソナー - ビルド成功

ダウンロードしたプロジェクトhttps://codeload.github.com/SonarSource/sonar-examples/legacy.zip/masterにある同じ pom.xml ファイルを使用しました

コンソール :

[INFO] ------------------------------------------------------------------------
[INFO] Building UT coverage with Maven reusing JUnit and JaCoCo reports 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- sonar-maven-plugin:2.1:sonar (default-cli) @ example-ut-maven-jacoco-reuseReports ---
[INFO] SonarQube version: 3.7.1
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Work directory: D:\TestWS\java-maven-simple\target\sonar
INFO: SonarQube Server 3.7.1
[INFO] [21:03:10.910] Load batch settings
[INFO] [21:03:11.043] User cache: C:\Users\user\.sonar\cache
[INFO] [21:03:11.046] Install plugins
[INFO] [21:03:12.549] Install JDBC driver
[INFO] [21:03:12.555] Create JDBC datasource for jdbc:mysql://serverip:3306/sonar?useUnicode=true&characterEncoding=utf8
[INFO] [21:03:14.889] Initializing Hibernate
[INFO] [21:03:18.154] Load project settings
[INFO] [21:03:18.188] Apply project exclusions
[INFO] [21:03:18.346] -------------  Scan UT coverage with Maven reusing JUnit and JaCoCo reports
[INFO] [21:03:18.359] Load module settings
[INFO] [21:03:19.288] Quality profile : [name=Stella,language=java]
[INFO] [21:03:19.315] Excluded tests: 
[INFO] [21:03:19.315]   **/package-info.java
[INFO] [21:03:19.365] Configure Maven plugins
[INFO] [21:03:19.435] Compare to previous analysis (2013-10-21)
[INFO] [21:03:19.450] Compare over 30 days (2013-09-21, analysis of 2013-10-21 20:01:17.0)
[INFO] [21:03:19.460] Compare to previous version
[INFO] [21:03:19.546] Base dir: D:\TestWS\java-maven-simple
[INFO] [21:03:19.547] Working dir: D:\TestWS\java-maven-simple\target\sonar
[INFO] [21:03:19.547] Source dirs: D:\TestWS\java-maven-simple\src\main\java
[INFO] [21:03:19.547] Binary dirs: D:\TestWS\java-maven-simple\target\classes
[INFO] [21:03:19.547] Source encoding: UTF-8, default locale: en_US
[INFO] [21:03:19.550] Sensor JavaSourceImporter...
[INFO] [21:03:19.551] Sensor JavaSourceImporter done: 1 ms
[INFO] [21:03:19.551] Sensor JavaSquidSensor...
[INFO] [21:03:19.551] Sensor JavaSquidSensor done: 0 ms
[INFO] [21:03:19.551] Sensor SurefireSensor...
[INFO] [21:03:19.552] parsing D:\TestWS\java-maven-simple\reports\junit
[INFO] [21:03:19.554] Sensor SurefireSensor done: 3 ms
[INFO] [21:03:19.554] Sensor CpdSensor...
[INFO] [21:03:19.554] SonarEngine is used
[INFO] [21:03:19.555] Sensor CpdSensor done: 1 ms
[INFO] [21:03:19.555] Sensor InitialOpenIssuesSensor...
[INFO] [21:03:19.560] Sensor InitialOpenIssuesSensor done: 5 ms
[INFO] [21:03:19.560] Sensor ProfileSensor...
[INFO] [21:03:19.818] Sensor ProfileSensor done: 258 ms
[INFO] [21:03:19.818] Sensor ProfileEventsSensor...
[INFO] [21:03:19.845] Sensor ProfileEventsSensor done: 27 ms
[INFO] [21:03:19.845] Sensor ProjectLinksSensor...
[INFO] [21:03:19.854] Sensor ProjectLinksSensor done: 9 ms
[INFO] [21:03:19.855] Sensor VersionEventsSensor...
[INFO] [21:03:19.874] Sensor VersionEventsSensor done: 19 ms
[INFO] [21:03:19.874] Sensor Maven dependencies...
[INFO] [21:03:19.880] Sensor Maven dependencies done: 6 ms
[INFO] [21:03:19.880] Sensor JaCoCoSensor...
[INFO] [21:03:19.882] Project coverage is set to 0% since there is no directories with classes.
[INFO] [21:03:19.882] Sensor JaCoCoSensor done: 2 ms
[INFO] [21:03:20.087] Execute decorators...
[INFO] [21:03:20.283] Store results in database
[INFO] [21:03:20.329] ANALYSIS SUCCESSFUL, you can browse http://serverip:9090/dashboard/index/org.codehaus.sonar:example-ut-maven-jacoco-reuseReports
[INFO] [21:03:20.362] Executing post-job class org.sonar.plugins.core.issue.notification.SendIssueNotificationsPostJob
[INFO] [21:03:20.362] Executing post-job class org.sonar.plugins.core.batch.IndexProjectPostJob
[INFO] [21:03:20.478] Executing post-job class org.sonar.plugins.dbcleaner.ProjectPurgePostJob
[INFO] [21:03:20.487] -> Keep one snapshot per day between 2013-09-23 and 2013-10-20
[INFO] [21:03:20.488] -> Keep one snapshot per week between 2012-10-22 and 2013-09-23
[INFO] [21:03:20.488] -> Keep one snapshot per month between 2008-10-27 and 2012-10-22
[INFO] [21:03:20.489] -> Delete data prior to: 2008-10-27
[INFO] [21:03:20.493] -> Clean UT coverage with Maven reusing JUnit and JaCoCo reports [id=3300]
[INFO] [21:03:20.498] <- Clean snapshot 14204
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

この後、 に移動しましたhttp://serverip:9090。1. 上記のプロジェクトがダッシュボードに一覧表示されます。しかし、ダッシュボードには問題がリストされていません。代わりに 0 が表示されます。 2. クラスを含むディレクトリがないため、プロジェクト カバレッジは 0% に設定されます。

どこが間違っているのですか.. ??

前もって感謝します

注:最初は、分析用のリアルタイムプロジェクトから始めました。多くの問題に直面した後、サンプルプロジェクトから始めました。

4

2 に答える 2