分析ant的声纳扫描仪时出错

时间:2018-12-12 14:53:46

标签: sonarqube sonarqube-scan

当我尝试在项目中运行“声纳”蚂蚁任务时,出现以下错误。这是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版

0 个答案:

没有答案