找到你要的答案

Q:org.sonar.runner.impl.RunnerException: Unable to execute Sonar

Q:org.sonar.runner.impl.runnerexception:无法执行声纳

I am trying to integrate Sonar task in Ant build in Eclipse. SonarQube server is running successfully at the default port on localhost. On opening "http://localhost:9000/" in browser, SonarQube web interface is successfully opening.

Problem is when I am running Sonar task from Ant build file it is giving error "org.sonar.runner.impl.RunnerException: Unable to execute Sonar". That's it. No stacktrace is logged on console.

The sonar task in ANt build is defined as below:

<target name="sonar" depends="jcompile">        
         <taskdef uri="antlib:org.sonar.ant" resource="org/sonar/ant/antlib.xml">
            <classpath path="<PathToAntPlugin>/lib/sonar-ant-task-2.2.jar" />
         </taskdef>                      
        <property name="sonar.projectDescription" value="Example application using Ant and Jacoco" />
        <property name="sonar.sources" value="${basedir}/src" />         
        <property name="sonar.host.url" value="http://localhost:9000"/>          
        <property name="sonar.surefire.reportsPath" value="${reports.junit.xml.dir}" />          
        <property name="sonar.core.codeCoveragePlugin" value="jacoco" />
        <property name="sonar.jacoco.antTargets" value="run-tests" />
        <property name="sonar.projectKey" value="<PathToMyProject>" />
        <property name="sonar.projectVersion" value="1.0" />            
        <sonar:sonar xmlns:sonar="antlib:org.sonar.ant"/>           
</target>

Other details: SonarQube Server 4.5, sonar-ant-task-2.2.jar, JDK 1.6.0_21, Eclipse Kepler

Is there any comptability issue between the jdk, eclipse, sonar server or sonar ant jar? Is there any way to find the detail logs in order to debug the issue?

Apart from above issue, I am having other issue. When I am installing SonarCube plugin in eclipse, in Windows ->Preferences SonarCube is not coming. However, in installed software list in Eclipse it is listed. I have tried to run eclipse with -clean option but no success. Please let me know what could be the problem?

我试图整合声纳任务在蚂蚁建立在Eclipse。sonarqube服务器成功运行在本地主机上的默认端口。打开“HTTP:/ /本地:9000 /“在浏览器中,SonarQube成功地打开网页界面。

Problem is when I am running Sonar task from Ant build file it is giving error "org.sonar.runner.impl.runnerexception:无法执行声纳". That's it. No stacktrace is logged on console.

Ant构建中的声纳任务定义如下:

<target name="sonar" depends="jcompile">        
         <taskdef uri="antlib:org.sonar.ant" resource="org/sonar/ant/antlib.xml">
            <classpath path="<PathToAntPlugin>/lib/sonar-ant-task-2.2.jar" />
         </taskdef>                      
        <property name="sonar.projectDescription" value="Example application using Ant and Jacoco" />
        <property name="sonar.sources" value="${basedir}/src" />         
        <property name="sonar.host.url" value="http://localhost:9000"/>          
        <property name="sonar.surefire.reportsPath" value="${reports.junit.xml.dir}" />          
        <property name="sonar.core.codeCoveragePlugin" value="jacoco" />
        <property name="sonar.jacoco.antTargets" value="run-tests" />
        <property name="sonar.projectKey" value="<PathToMyProject>" />
        <property name="sonar.projectVersion" value="1.0" />            
        <sonar:sonar xmlns:sonar="antlib:org.sonar.ant"/>           
</target>

Other details: SonarQube Server 4.5, sonar-ant-task-2.2.jar, JDK 1.6.0_21, Eclipse Kepler

有什么comptability问题之间的JDK,Eclipse,声纳服务器或声纳蚂蚁的瓶子吗?有没有办法找到详细的日志,以便调试的问题?

除了上述问题外,我还有其他问题。当我在Eclipse插件安装SonarCube,在Windows & gt;偏好sonarcube不来了。然而,在Eclipse中安装的软件列表中。我已经尝试运行Eclipse与清洁选项,但没有成功。请告诉我有什么问题吗?

answer1: 回答1:

For the missing preferences, the Installation FAQ of Sonar says to do a restart with -clean argument.

对失踪的喜好,声纳安装FAQ说做重启与干净的论点。

answer2: 回答2:

When we are running the build file from eclipse it is not giving full stack trace on console in some cases. Try to run the build file from the command prompt.

For example:

Open command prompt window and go to eclipse ant bin directory path(In my system it is C:\eclipse\plugins\org.apache.ant_1.9.6.v201510161327\bin) and from here run your build file using ant command.

    C:\eclipse\plugins\org.apache.ant_1.9.6.v201510161327\bin>ant -buildfile [path_of_build_file]\build-test.xml

I know I am late, but this is to help who visits this with same problem

当我们从Eclipse运行生成文件时,它在某些情况下不会在控制台上提供完整堆栈跟踪。尝试从命令提示符运行生成文件。

例如:

打开命令提示符窗口去食蚂蚁的bin目录的路径(在我的系统中,它是C:\ \ \“Eclipse插件。Apache。ant_1.9.6。v201510161327 \bin)从这里跑你的构建使用Ant命令文件。

    C:\eclipse\plugins\org.apache.ant_1.9.6.v201510161327\bin>ant -buildfile [path_of_build_file]\build-test.xml

我知道我迟到了,但这是帮助谁访问同样的问题

ant  eclipse-plugin  eclipse-kepler  sonarqube-4.5