Sonarqube gradle任务未识别项目工作区中的sonar-project.properties文件
我已经创建了一个示例spring启动项目以及其中的sonarqube gradle插件。我已经将所有需要的属性(如登录令牌)添加到sonar-project.properties中。但是在运行gradle任务时,我发现身份验证异常 添加了Gradle插件Sonarqube gradle任务未识别项目工作区中的sonar-project.properties文件,sonarqube,Sonarqube,我已经创建了一个示例spring启动项目以及其中的sonarqube gradle插件。我已经将所有需要的属性(如登录令牌)添加到sonar-project.properties中。但是在运行gradle任务时,我发现身份验证异常 添加了Gradle插件 plugins{id“org.sonaqube”version“2.6”} Gradle analysis不读取sonar project.properties。相反,将这些值添加到build.gradle Gradle analysis不读取
plugins{id“org.sonaqube”version“2.6”}
Gradle analysis不读取
sonar project.properties
。相反,将这些值添加到build.gradle
Gradle analysis不读取sonar project.properties。相反,将这些值添加到
build.gradle
我也遭受了这种痛苦,我的解决办法是解析设置文件并应用它:
sonarqube {
// this is silly but specifying the actual settings file is not supported
properties {
def props = new Properties()
file("sonar-project.properties").withInputStream { props.load(it) }
props.each {
property("${it.key}", "${it.value}")
}
}
}
我也遭受了这种痛苦,我的解决办法是解析设置文件并应用它:
sonarqube {
// this is silly but specifying the actual settings file is not supported
properties {
def props = new Properties()
file("sonar-project.properties").withInputStream { props.load(it) }
props.each {
property("${it.key}", "${it.value}")
}
}
}
对我来说,这是一个很好的解决方案。它避免了在两个不同的文件中具有双重属性。感谢您分享对我有效的伟大解决方案。它避免了在两个不同的文件中具有双重属性。谢谢分享