使用ant文件执行声纳时出错

时间:2014-04-22 06:47:40

标签: ant sonarqube

下面的行是我的ant构建文件的开头,当我尝试使用它实现声纳时,它会显示以下错误。

属性" xmlns的价值:声纳"与元素类型相关联"项目"不得包含'<'字符。

      <project name="DokLink"  default="all"  basedir="." xmlns:sonar="antlib:org.sonar.ant>

      <description> Build the DevEnvExample, to illustrate how DevEnv works </description>

1 个答案:

答案 0 :(得分:2)

您已向ANT提交了无效的XML文件。您在Sonar URI周围错过了最终报价:

$ xmllint build.xml
..
..
build.xml:3: namespace error : xmlns:sonar: 'antlib:org.sonar.ant>        ' is not a valid URI
..
..

以下是更正的XML文件:

<project name="DokLink"  default="all"  basedir="." xmlns:sonar="antlib:org.sonar.ant">

      <description> Build the DevEnvExample, to illustrate how DevEnv works </description>

</project>
相关问题