Crap4j libClassPath作为路径引用

时间:2012-06-01 10:45:06

标签: java ant utility

我正在尝试使用CRAP4J实用程序来分析我的代码,并且在传递类路径时卡住了。我的蚂蚁任务如下所示;

<target name="run-crap-4j" unless="crap-4j-finishes" depends="init" description="This target will run crap-4j for analysis." >
    <crap4j projectdir="${basedir}" outputDir="${build.dir}${file.separator}reports${file.separator}crap4j"
            dontTest="false" debug="false">
        <srces>
            <pathElement location="${base.dir}${file.separator}src" />
        </srces>        
        <classes>
            <pathElement location="${build.dir}${file.separator}classes" />
        </classes>
        <testClasses>
            <pathElement location="${build.dir}${file.separator}testclasses" />
        </testClasses>

        <libClasspath>
            <path refid="${project.classpath}" />
            <path refid="${test.classpath}" />
        </libClasspath>
    </crap4j>
    <property name="crap-4j-finishes" value="true"/>
</target>

当我运行目标时,它会给我以下错误;

run-crap-4j:
Unresolvable reference ${project.classpath} might be a misuse of property expansion syntax.

BUILD FAILED
C:\RTC\TechDev\SoaFramework\build.xml:931: Reference ${project.classpath} not found.

根据CRAP4J文档,我应该传递文件集,但问题是我在一个位置没有我的依赖项,它们遍布各地。你能帮我解决一下这个问题,或者给我一些关于如何继续进行的建议吗?

由于

-

Sjunejo

1 个答案:

答案 0 :(得分:1)

显然是CRAP4J中的一个错误。请参阅以下链接以获得解决方案;

http://code.google.com/p/crap4j/issues/detail?id=12

谢谢,

-

SJunejo