在preFIX"声纳"对于元件QUOT;声纳:声纳"未绑定 [英] The prefix "sonar" for element "sonar:sonar" is not bound

查看:209
本文介绍了在preFIX"声纳"对于元件QUOT;声纳:声纳"未绑定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个build.xml文件看起来是这样的:

I have a build.xml-file that looks something like this:

<taskdef uri="antlib:org.sonar.ant" resource="org/sonar/ant/antlib.xml" classpath="/path/sonar-ant-task.jar"/>

<target name="sonar">       
    <sonar:sonar/>
</target>

当我运行该文件,我得到:

And when I run the file I get:

The prefix "sonar" for element "sonar:sonar" is not bound.

任何明显的事情我失踪?

Any obvious things I'm missing?

推荐答案

您错过在Ant脚本的顶部项目元素的名称空间声明。

You're missing the namespace declaration in the top project element of your Ant script.

的xmlns:声纳=的antlib:org.sonar.ant。应该做到这一点。

这篇关于在preFIX&QUOT;声纳&QUOT;对于元件QUOT;声纳:声纳&QUOT;未绑定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆