sonarqube - 分析 ANT 声纳扫描仪时出错
问题描述
当我尝试在我的项目中运行“声纳”蚂蚁任务时,出现以下错误。这是ANT配置
<property name="sonar.host.url" value="https://pbvlsbs1.server.local/sonar/" />
<property file="build.properties" />
<!-- Define the SonarQube project properties -->
<property name="sonar.projectKey" value="org.sonarqube:sonarqube-scanner-ant" />
<property name="sonar.projectName" value="Example of SonarQube Scanner for Ant Usage" />
<property name="sonar.projectVersion" value="1.0" />
<property name="sonar.sources" value="src" />
<property name="sonar.java.binaries" value="target/classes" />
<property name="sonar.java.libraries" value="lib/*.jar" />
<target name="sonar" depends="build">
<taskdef uri="antlib:org.sonar.ant" resource="org/sonar/ant/antlib.xml">
<!-- Update the following line, or put the "sonarqube-ant-task-*.jar" file in your "$HOME/.ant/lib" folder -->
<classpath path="D:/RCS/RCSBase/lib/sonarqube-ant-task-2.5.jar" />
</taskdef>
<!-- Execute SonarQube Scanner for Ant Analysis -->
<sonar:sonar/>
</target>
However when I execute the "sonar" target, I got the following error.
[sonar:sonar] Findbugs output report: D:\RCS\RCSBase\.sonar\findbugs-result.xml
[sonar:sonar] Execution getVersion
[sonar:sonar] Execution stop
BUILD FAILED
D:\RCS\RCSBase\build.xml:318: java.lang.IllegalStateException: Can not execute Findbugs
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:109)
at org.apache.tools.ant.Task.perform(Task.java:350)
at org.apache.tools.ant.Target.execute(Target.java:449)
at org.apache.tools.ant.Target.performTasks(Target.java:470)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1388)
at org.apache.tools.ant.Project.executeTarget(Project.java:1361)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:36)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:460)
at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:142)
Caused by: java.nio.file.InvalidPathException: Illegal char <*> at index 0: **/lib/**
at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
at sun.nio.fs.AbstractPath.resolve(AbstractPath.java:53)
at org.sonar.api.scan.filesystem.PathResolver.relativeFile(PathResolver.java:44)
at org.sonar.plugins.findbugs.FindbugsConfiguration.getExcludesFilters(FindbugsConfiguration.java:214)
at org.sonar.plugins.findbugs.FindbugsExecutor.execute(FindbugsExecutor.java:152)
... 47 more
有任何想法吗
Sonarqube 服务器:6.7 - JDK:1.8.0_191 - Ant 版本:Apache Ant(TM) 版本 1.10.5
解决方案
推荐阅读
- gstreamer - 如何保存进入 Kaldi-Gstreamer 的音频流
- java - 为什么 Collectors.toUnmodifiableList 使用中间累加器的类型检查?
- python - 如何在 Power BI 中的 python 脚本中基于数据框中的搜索打印详细信息
- flutter - Flutter - 自动滚动到 CaroidrlSlider
- angular - Angular:验证器是否删除并重新分配值更改时的错误(当它们运行时)?
- javascript - 为什么将变量放在函数内部/外部时结果不同?
- java - 将 AdMob 与 Android 应用程序集成时出现问题
- google-apps-script - 如何让 Google Script 在两个函数之间等待 3 秒?2 个功能在 1 个按钮中
- java - Java 中的线程 VS 应用程序服务器/Tomcat 中的线程
- node.js - 查找时数组引用的mongodb顺序