Ant 声纳蚂蚁任务执行错误
我编写了ant sonar任务,但是当我在控制台中执行时,我得到了以下错误Ant 声纳蚂蚁任务执行错误,ant,sonarqube,sonar-runner,Ant,Sonarqube,Sonar Runner,我编写了ant sonar任务,但是当我在控制台中执行时,我得到了以下错误 E:\Liferay\Liferay 6.2\workspace\plugins\build.xml:305: org.sonar.batch.bootstrapper.BootstrapException: java.io.IOException: Server returned HTTP response code: 400 for URL: http://localhost:9000/sonar/batc
E:\Liferay\Liferay 6.2\workspace\plugins\build.xml:305:
org.sonar.batch.bootstrapper.BootstrapException: java.io.IOException:
Server returned HTTP response code: 400 for URL: http://localhost:9000/sonar/batch/
就连我都试过了
下面是我的蚂蚁目标
<target name="sonar">
<taskdef uri="antlib:org.sonar.ant" resource="org/sonar/ant/antlib.xml">
<!-- Update the following line, or put the "sonar-ant-task-*.jar" file in your "$HOME/.ant/lib" folder -->
<classpath path="D:\sonar-ant-task-1.3.jar" />
</taskdef>
<property name="sonar.host.url" value="http://localhost:9000/sonar" />
<property name="sonar.jdbc.url" value="jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8" />
<property name="sonar.jdbc.driverClassName" value="com.mysql.jdbc.Driver" />
<!-- the username and password of your database -->
<property name="sonar.jdbc.username" value="root" />
<property name="sonar.jdbc.password" value="" />
<!-- list of mandatories Sonar properties -->
<property name="sonar.sources" value="portlets/${projectName}/docroot/WEB-INF/src" />
<property name="sonar.projectName" value="${projectNameInSonarPortal}" />
<property name="sonar.binaries" value="portlets/${projectName}/docroot/WEB-INF/classes" />
<property name="sonar.libraries" value="portlets/${projectName}/docroot/WEB-INF/lib" />
<!-- The console info -->
<echo>The given project name ${projectName}></echo>
<echo>The project name in sonar portal ${projectNameInSonarPortal}</echo>
<echo>The sonar sources directory ${sonar.sources}</echo>
<!-- Execute Sonar -->
<sonar:sonar />
<!--<sonar:sonar key="encore-portal" version="0.1-SNAPSHOT" xmlns:sonar="antlib:org.sonar.ant"/>-->
</target>
有人能帮忙吗?我用谷歌搜索过,但所有的解决方案都不适合我。我花了很多时间在这上面。请用我的双手添加财富之手你能用以下信息编辑你的问题吗:安装了哪个版本的SonarQube?因为您使用的是非常旧版本的SonarQube Ant任务,请参阅
sonar.web.host: localhost
sonar.web.port: 9000
sonar.web.context: /sonar
sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8
sonar.jdbc.driverClassName: com.mysql.jdbc.Driver