0

我如何在詹金斯启动声纳。我的系统中有声纳 3.1.1。
我对詹金斯没有深入的了解。我启动了 junkins 并添加了 sonar-junkins 插件。之后在 Manage jenkins -> Configure system 我添加了声纳,详细信息如下,

Name : sonar
Server URL : http://localhost:9000
Database URL : jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true
Database login : sonar
Database password : sonar
Database driver : com.mysql.jdbc.Driver

然后应用它并保存它。
但我在詹金斯中看不到任何与声纳有关的东西。我可以在 jenkins 中查看声纳的主页。

4

2 回答 2

3

Sonar Jenkins Plugin的文档页面上对所有内容进行了完美的描述,因此请仔细阅读所有页面并按照指南一步一步地进行操作,一切都应该没问题。

于 2013-01-23T08:15:15.363 回答
0

要调用声纳独立分析,您必须配置所有项目属性。你做吧?这里有一个例子:

# required metadata
sonar.projectKey=yourapp:YourApplication
sonar.projectName=YourApplication
sonar.projectVersion=1.0

# path to source directories (required)
sonar.sources=yourApplication/JavaSource

# path to test source directories (optional)
sonar.tests=test

# path to project binaries (optional), for example directory of Java bytecode
sonar.binaries=YourApplication/build/classes/main

# optional comma-separated list of paths to libraries. Only path to JAR file and path to directory of classes are supported.
#sonar.libraries=path/to/library.jar,path/to/classes/dir

# The value of the property must be the key of the language.
sonar.language=java

sonar.dynamicAnalysis=reuseReports

#Surefire reports
sonar.surefire.reportsPath=yourApplication/build/test-results


sonargraph.prepareForSonar=true
# Additional parameters
#sonar.my.property=value

In base of your version of sonar / jenkins this configuration should be slightly different Then, if you don't make any change in the base configuration of Sonar, you don't need to put user=sonar, password=sonar

于 2013-01-23T10:18:14.600 回答