小编car*_*rio的帖子

JaCoCo - SonarQube - 没有关于每次测试的覆盖范围的信息

我正在使用JaCoCo进行代码覆盖.使用junit创建单元测试报告并正确导入它们,以便正确显示单元测试信息.该问题是,我得到的错误消息: 大约每测试覆盖无资料.并且代码覆盖率显示单元测试,集成测试和整体覆盖率的值0%.我检查了sonar-project.properties中的所有必需信息,如binary,src,tests等.

我正在使用:
- SonarQube 4.5.1
- SonarRunner 2.4
- MySQL
- junit 4.1.1
- jacoco 0.7.2

jacoco.exec位于项目基目录中的文件/目标中.

下面你可以看到sonar-project.properties:从我的角度来看,所有必要的路径都设置正确.(即二进制,src,测试)

Comma-separated paths to directories with sources (required)
sonar.sources=src

compiled code
sonar.java.binaries=class

source code of unit tests 
sonar.tests=test/src

Comma-separated paths to files with third-party libraries (JAR files in the case of Java)
sonar.java.libraries=jar

Language
sonar.language=java

Encoding of the source files
sonar.sourceEncoding=UTF-8

Additional parameters
sonar.my.property=value

Set Project Base
sonar.projectBaseDir=C:/snapshots/steffen_latest/software/java

Tells SonarQube to reuse existing reports for unit tests execution and …
Run Code Online (Sandbox Code Playgroud)

jacoco sonarqube

20
推荐指数
1
解决办法
1万
查看次数

在JBoss中进行部署时覆盖Spring Boot应用程序属性

我有一个基于Spring-Boot的应用程序,具有基于YAML的配置,当我使用时java -jar app.war -Dnamespace.properties=different_value,更改属性没有问题,但是现在我必须将该应用程序部署到JBoss EAP中,我成功地构建了war文件,但是我想修改属性(覆盖某些YAML值),而无需修改war。

文档提及

  • 来自Java:comp / env的JNDI属性。
  • Java系统属性(System.getProperties())

作为替代方案,但我不知道如何设置这些方案。有什么想法吗?

奖励:最好在运行时修改属性而无需重新部署应用程序

java jboss spring-boot

5
推荐指数
1
解决办法
848
查看次数

IntelliJ 有没有办法知道我在软件项目上花费了多少时间?

我正在使用 IntelliJ Idea 开发一个 Spring 项目。我想知道是否有办法从 IntelliJ 日志或其他一些黑暗的方式知道我在这个项目上花了多少时间?

我是在看到Productivity GuideIdea 后才问这个问题的。Help > Productivity Guide,我认为有可能,但是您对此有何看法/说/了解?

intellij-idea

3
推荐指数
1
解决办法
2329
查看次数

如何在代理后面通过SonarQube安装/更新插件?

我有一个SonarQube 5.1.2安装,我正在尝试安装和更新一些插件,服务器没有直接的互联网访问,我们在这里有一个代理,让我们说http://1.1.2.3:9191/是我们的代理和我们有用户和密码验证.好吧,我已经根据文档编写了sonar.properties

http.proxyHost=10.1.2.3
http.proxyPort=9191
http.proxyUser=theuser
http.proxyPassword=thepassword
Run Code Online (Sandbox Code Playgroud)

我转到http://sonar.sub.domain:9000/updatecenter/updates,我可以看到插件列表和更新,所以我假设在这一点上代理通信是正常的.

但是,当我尝试更新或安装插件时,我在页面中出现此错误(请注意该no proxy消息).

Fail to download the plugin (scmsvn, version 1.2) from https://bintray.com/artifact/download/sonarsource/SonarQube/org/sonarsource/scm/svn/sonar-scm-svn-plugin/1.2/sonar-scm-svn-plugin-1.2.jar (error is : Fail to download: https://bintray.com/artifact/download/sonarsource/SonarQube/org/sonarsource/scm/svn/sonar-scm-svn-plugin/1.2/sonar-scm-svn-plugin-1.2.jar (no proxy))   [hide] 
Run Code Online (Sandbox Code Playgroud)

所以我调试日志并尝试,这会出现在日志中

2015.09.11 09:32:47 DEBUG web[o.s.a.u.HttpDownloader$BaseHttpDownloader$HttpInputSupplier] Download: http://update.sonarsource.org/update-center.properties (HTTP proxy: 1.1.2.3:9191)
2015.09.11 09:32:49 DEBUG web[o.s.a.u.HttpDownloader$BaseHttpDownloader$HttpInputSupplier] Download: https://bintray.com/artifact/download/sonarsource/SonarQube/org/sonarsource/scm/svn/sonar-scm-svn-plugin/1.2/sonar-scm-svn-plugin-1.2.jar (no proxy)
2015.09.11 09:33:10 DEBUG web[o.s.s.p.PluginDownloader] Fail to download the plugin (scmsvn, version 1.2) from https://bintray.com/artifact/download/sonarsource/SonarQube/org/sonarsource/scm/svn/sonar-scm-svn-plugin/1.2/sonar-scm-svn-plugin-1.2.jar (error is : Fail to download: https://bintray.com/artifact/download/sonarsource/SonarQube/org/sonarsource/scm/svn/sonar-scm-svn-plugin/1.2/sonar-scm-svn-plugin-1.2.jar (no proxy))
org.sonar.api.utils.SonarException: Fail to download: …
Run Code Online (Sandbox Code Playgroud)

proxy sonarqube sonarqube5.1.2

1
推荐指数
1
解决办法
2879
查看次数