两周前我使用过Sonar,它工作正常。
现在,当我运行声纳时,没有更改项目,它显示0个问题,0%技术债务等。(两周前发现了20-30个问题,项目没有改变)< / p>
这是mvn声纳的结果:声纳
mvn sonar:sonar
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Golzio-Maumert-Rebouh-SillaPellicer 1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- sonar-maven-plugin:2.6:sonar (default-cli) @ Golzio-Maumert-Rebouh-SillaPellicer ---
[INFO] SonarQube version: 5.1.1
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Work directory: /Users/rebouhaymen/Documents/Projects/MinesAles/1A/ProjetGL/Golzio-Maumert-Rebouh-SillaPellicer/target/sonar
INFO: SonarQube Server 5.1.1
[INFO] [11:35:12.231] Load global repositories
[INFO] [11:35:12.368] Load global repositories (done) | time=140ms
[INFO] [11:35:12.370] Server id: 20150606110929
[INFO] [11:35:12.372] User cache: /Users/rebouhaymen/.sonar/cache
[INFO] [11:35:12.382] Install plugins
[INFO] [11:35:12.430] Install JDBC driver
[INFO] [11:35:12.437] Create JDBC datasource for jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8
[INFO] [11:35:13.627] Initializing Hibernate
[INFO] [11:35:15.128] Load project repositories
[INFO] [11:35:15.148] Load project repositories (done) | time=20ms
[INFO] [11:35:15.149] Load project settings
[INFO] [11:35:15.544] Load technical debt model
[INFO] [11:35:15.565] Apply project exclusions
[WARN] [11:35:15.843] SCM provider autodetection failed. No SCM provider claims to support this project. Please use sonar.scm.provider to define SCM of your project.
[INFO] [11:35:15.844] ------------- Scan Golzio-Maumert-Rebouh-SillaPellicer
[INFO] [11:35:15.848] Load module settings
[INFO] [11:35:15.974] Load rules
[INFO] [11:35:16.027] Base dir: /Users/rebouhaymen/Documents/Projects/MinesAles/1A/ProjetGL/Golzio-Maumert-Rebouh-SillaPellicer
[INFO] [11:35:16.027] Working dir: /Users/rebouhaymen/Documents/Projects/MinesAles/1A/ProjetGL/Golzio-Maumert-Rebouh-SillaPellicer/target/sonar
[INFO] [11:35:16.028] Source paths: pom.xml, src/main/java
[INFO] [11:35:16.028] Test paths: src/test/java
[INFO] [11:35:16.028] Binary dirs: target/classes
[INFO] [11:35:16.028] Source encoding: UTF-8, default locale: en_US
[INFO] [11:35:16.029] Index files
[INFO] [11:35:16.038] 0 files indexed
[INFO] [11:35:16.067] Sensor Lines Sensor
[INFO] [11:35:16.068] Sensor Lines Sensor (done) | time=1ms
[INFO] [11:35:16.068] Sensor QProfileSensor
[INFO] [11:35:16.085] Sensor QProfileSensor (done) | time=17ms
[INFO] [11:35:16.085] Sensor InitialOpenIssuesSensor
[INFO] [11:35:16.094] Sensor InitialOpenIssuesSensor (done) | time=9ms
[INFO] [11:35:16.094] Sensor ProjectLinksSensor
[INFO] [11:35:16.108] Sensor ProjectLinksSensor (done) | time=14ms
[INFO] [11:35:16.108] Sensor VersionEventsSensor
[INFO] [11:35:16.122] Sensor VersionEventsSensor (done) | time=14ms
[INFO] [11:35:16.122] Sensor Maven dependencies
[INFO] [11:35:16.169] Sensor Maven dependencies (done) | time=47ms
[INFO] [11:35:16.169] Sensor SCM Sensor
[INFO] [11:35:16.169] No SCM system was detected. You can use the 'sonar.scm.provider' property to explicitly specify it.
[INFO] [11:35:16.169] Sensor SCM Sensor (done) | time=0ms
[INFO] [11:35:16.169] Sensor CPD Sensor
[INFO] [11:35:16.169] Sensor CPD Sensor (done) | time=0ms
[INFO] [11:35:16.170] No quality gate is configured.
[INFO] [11:35:16.215] Compare to previous analysis (2015-06-06)
[INFO] [11:35:16.221] Compare over 30 days (2015-05-07, analysis of Fri May 29 14:22:45 CEST 2015)
[INFO] [11:35:16.550] Execute decorators...
[INFO] [11:35:16.672] Store results in database
[INFO] [11:35:16.749] Analysis reports generated in 31ms, dir size=142 bytes
[INFO] [11:35:16.754] Analysis reports compressed in 5ms, zip size=518 bytes
[INFO] [11:35:16.782] Analysis reports sent to server in 28ms
[INFO] [11:35:16.782] ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard/index/projetGL:Golzio-Maumert-Rebouh-SillaPellicer
[INFO] [11:35:16.782] Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.774 s
[INFO] Finished at: 2015-06-06T11:35:16+02:00
[INFO] Final Memory: 18M/420M
[INFO] ------------------------------------------------------------------------
`
这是我的pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>projetGL</groupId>
<artifactId>Golzio-Maumert-Rebouh-SillaPellicer</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<name>Golzio-Maumert-Rebouh-SillaPellicer</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.35</version>
</dependency>
</dependencies>
<!-- http://maven.apache.org/general.html#encoding-warning -->
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<sonar.jdbc.url>jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8</sonar.jdbc.url>
<sonar.jdbc.driver>com.mysql.jdbc.Driver</sonar.jdbc.driver>
<sonar.jdbc.username>sonar</sonar.jdbc.username>
<sonar.jdbc.password>sonar</sonar.jdbc.password>
<sonar.host.url>http://localhost:9000</sonar.host.url>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.4.0</version>
<executions>
<execution>
<id>Test</id>
<phase>test</phase>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>projetGL.App</mainClass>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>2.6</version>
</plugin>
</plugins>
</build>
</project>
这是服务器日志:
2015.06.07 14:28:28 INFO es[o.s.p.ProcessEntryPoint] Starting search
2015.06.07 14:28:28 INFO es[o.s.s.SearchServer] Starting Elasticsearch[sonarqube] on port 9001
2015.06.07 14:28:33 INFO es[o.elasticsearch.node] [sonar-1433680102830] version[1.4.4], pid[40316], build[c88f77f/2015-02-19T13:05:36Z]
2015.06.07 14:28:33 INFO es[o.elasticsearch.node] [sonar-1433680102830] initializing ...
2015.06.07 14:28:33 INFO es[o.e.plugins] [sonar-1433680102830] loaded [], sites []
2015.06.07 14:28:36 INFO es[o.elasticsearch.node] [sonar-1433680102830] initialized
2015.06.07 14:28:36 INFO es[o.elasticsearch.node] [sonar-1433680102830] starting ...
2015.06.07 14:28:41 INFO es[o.e.transport] [sonar-1433680102830] bound_address {inet[/0.0.0.0:9001]}, publish_address {inet[/172.20.10.3:9001]}
2015.06.07 14:28:41 INFO es[o.e.discovery] [sonar-1433680102830] sonarqube/dOoDg_ijSRqe9slU7KQPQQ
2015.06.07 14:28:44 INFO es[o.e.cluster.service] [sonar-1433680102830] new_master [sonar-1433680102830][dOoDg_ijSRqe9slU7KQPQQ][MacBook-Pro-de-Rebouh.local][inet[/172.20.10.3:9001]]{rack_id=sonar-1433680102830}, reason: zen-disco-join (elected_as_master)
2015.06.07 14:28:44 INFO es[o.elasticsearch.node] [sonar-1433680102830] started
2015.06.07 14:28:45 INFO es[o.e.gateway] [sonar-1433680102830] recovered [6] indices into cluster_state
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=160m; support was removed in 8.0
2015.06.07 14:28:45 INFO app[o.s.p.m.Monitor] Process[search] is up
2015.06.07 14:28:45 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[web]: /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false -Djruby.compile.invokedynamic=false -Xmx768m -XX:MaxPermSize=160m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true -Djava.io.tmpdir=/Users/rebouhaymen/Documents/sonarqube-5.1.1/temp -cp ./lib/common/*:./lib/server/*:/Users/rebouhaymen/Documents/sonarqube-5.1.1/lib/jdbc/mysql/mysql-connector-java-5.1.34.jar org.sonar.server.app.WebServer /var/folders/30/vc9tg8r5173fr2lzwxd2ywdc0000gn/T/sq-process8400283793441720685properties
2015.06.07 14:28:51 INFO web[o.s.p.ProcessEntryPoint] Starting web
2015.06.07 14:28:51 INFO web[o.s.s.app.Webapp] Webapp directory: /Users/rebouhaymen/Documents/sonarqube-5.1.1/web
2015.06.07 14:28:51 INFO web[o.a.c.h.Http11NioProtocol] Initializing ProtocolHandler ["http-nio-0.0.0.0-9000"]
2015.06.07 14:28:51 INFO web[o.a.t.u.n.NioSelectorPool] Using a shared selector for servlet write/read
2015.06.07 14:28:52 INFO web[o.e.plugins] [sonar-1433680102830] loaded [], sites []
2015.06.07 14:29:03 INFO web[o.s.s.p.ServerImpl] SonarQube Server / 5.1.1 / 0a231d24c0f1e7ce1d200274b8e9bbe00f9f49fb
2015.06.07 14:29:03 INFO web[o.s.c.p.Database] Create JDBC datasource for jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance
2015.06.07 14:29:04 INFO web[o.s.s.p.DefaultServerFileSystem] SonarQube home: /Users/rebouhaymen/Documents/sonarqube-5.1.1
2015.06.07 14:29:04 INFO web[o.s.s.p.ServerPluginJarsInstaller] Install plugins
2015.06.07 14:29:04 INFO web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin Core / 5.1.1 / 0a231d24c0f1e7ce1d200274b8e9bbe00f9f49fb
2015.06.07 14:29:04 INFO web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin Email notifications / 5.1.1 / 0a231d24c0f1e7ce1d200274b8e9bbe00f9f49fb
2015.06.07 14:29:04 INFO web[o.s.s.p.ServerPluginJarsInstaller] Deploy plugin English Pack / 5.1.1 / 0a231d24c0f1e7ce1d200274b8e9bbe00f9f49fb
2015.06.07 14:29:04 INFO web[o.s.s.p.RailsAppsDeployer] Deploy Ruby on Rails applications
2015.06.07 14:29:04 INFO web[o.s.j.s.AbstractDatabaseConnector] Initializing Hibernate
2015.06.07 14:29:11 INFO web[o.s.s.p.UpdateCenterClient] Update center: http://update.sonarsource.org/update-center.properties (no proxy)
2015.06.07 14:29:11 INFO web[o.s.s.n.NotificationService] Notification service started (delay 60 sec.)
2015.06.07 14:29:11 INFO web[o.s.s.s.IndexSynchronizer] Index rules
2015.06.07 14:29:12 INFO web[o.s.s.s.IndexSynchronizer] Index activeRules
2015.06.07 14:29:13 INFO web[o.s.s.s.RegisterMetrics] Register metrics
2015.06.07 14:29:13 INFO web[o.s.s.s.RegisterMetrics] Cleaning quality gate conditions
2015.06.07 14:29:13 INFO web[o.s.s.s.RegisterDebtModel] Register technical debt model
2015.06.07 14:29:13 INFO web[o.s.s.r.RegisterRules] Register rules
2015.06.07 14:29:13 INFO web[o.s.s.q.RegisterQualityProfiles] Register quality profiles
2015.06.07 14:29:13 INFO web[o.s.s.s.RegisterNewMeasureFilters] Register measure filters
2015.06.07 14:29:13 INFO web[o.s.s.s.RegisterDashboards] Register dashboards
2015.06.07 14:29:13 INFO web[o.s.s.s.RegisterPermissionTemplates] Register permission templates
2015.06.07 14:29:13 INFO web[o.s.s.s.RenameDeprecatedPropertyKeys] Rename deprecated property keys
2015.06.07 14:29:13 INFO web[o.s.s.s.IndexSynchronizer] Index activities
2015.06.07 14:29:13 INFO web[o.s.s.s.IndexSynchronizer] Index issues
2015.06.07 14:29:13 INFO web[o.s.s.s.IndexSynchronizer] Index source lines
2015.06.07 14:29:13 INFO web[o.s.s.s.IndexSynchronizer] Index users
2015.06.07 14:29:13 INFO web[o.s.s.s.IndexSynchronizer] Index views
2015.06.07 14:29:13 INFO web[jruby.rack] jruby 1.7.9 (ruby-1.8.7p370) 2013-12-06 87b108a on Java HotSpot(TM) 64-Bit Server VM 1.8.0_25-b17 [darwin-x86_64]
2015.06.07 14:29:13 INFO web[jruby.rack] using a shared (threadsafe!) runtime
2015.06.07 14:29:14 WARN es[o.e.c.r.a.decider] [sonar-1433680102830] high disk watermark [10%] exceeded on [dOoDg_ijSRqe9slU7KQPQQ][sonar-1433680102830] free: 18.6gb[8%], shards will be relocated away from this node
2015.06.07 14:29:14 INFO es[o.e.c.r.a.decider] [sonar-1433680102830] high disk watermark exceeded on one or more nodes, rerouting shards
2015.06.07 14:29:21 INFO web[jruby.rack] keeping custom (config.logger) Rails logger instance
2015.06.07 14:29:21 INFO web[o.a.c.h.Http11NioProtocol] Starting ProtocolHandler ["http-nio-0.0.0.0-9000"]
2015.06.07 14:29:21 INFO web[o.s.s.a.TomcatAccessLog] Web server is started
2015.06.07 14:29:21 INFO web[o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000
2015.06.07 14:29:21 INFO app[o.s.p.m.Monitor] Process[web] is up
2015.06.07 14:29:44 WARN es[o.e.c.r.a.decider] [sonar-1433680102830] high disk watermark [10%] exceeded on [dOoDg_ijSRqe9slU7KQPQQ][sonar-1433680102830] free: 18.6gb[8%], shards will be relocated away from this node
2015.06.07 14:30:09 INFO web[o.s.s.c.ComputationService] Analysis of project projetGL:Golzio-Maumert-Rebouh-SillaPellicer (report 9) (done) | time=317ms
2015.06.07 14:30:14 WARN es[o.e.c.r.a.decider] [sonar-1433680102830] high disk watermark [10%] exceeded on [dOoDg_ijSRqe9slU7KQPQQ][sonar-1433680102830] free: 18.6gb[8%], shards will be relocated away from this node
2015.06.07 14:30:44 WARN es[o.e.c.r.a.decider] [sonar-1433680102830] high disk watermark [10%] exceeded on [dOoDg_ijSRqe9slU7KQPQQ][sonar-1433680102830] free: 18.6gb[8%], shards will be relocated away from this node
2015.06.07 14:30:44 INFO es[o.e.c.r.a.decider] [sonar-1433680102830] high disk watermark exceeded on one or more nodes, rerouting shards
2015.06.07 14:31:14 WARN es[o.e.c.r.a.decider] [sonar-1433680102830] high disk watermark [10%] exceeded on [dOoDg_ijSRqe9slU7KQPQQ][sonar-1433680102830] free: 18.6gb[8%], shards will be relocated away from this node
答案 0 :(得分:2)
未安装Java插件。升级到5.1.1时,您可能忘记复制目录扩展/插件。