【问题标题】:error while executing sonar with ant file使用 ant 文件执行声纳时出错
【发布时间】:2014-06-06 09:39:47
【问题描述】:

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

与元素类型“project”关联的属性“xmlns:sonar”的值不能包含“

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

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

【问题讨论】:

    标签: ant sonarqube


    【解决方案1】:

    您向 ANT 提交了无效的 XML 文件。您缺少围绕声纳 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>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-12-26
      • 1970-01-01
      • 2017-07-08
      • 1970-01-01
      • 2014-02-18
      • 1970-01-01
      • 2011-03-03
      相关资源
      最近更新 更多