0
我想使用CRAP4J實用程序來分析我的代碼,並在傳遞類路徑時卡住了。我的螞蟻任務如下:Crap4j libClassPath作爲路徑參考
<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
我已經更新了我的劇本,現在我在本地複製我的所有文件到項目lib目錄和CRAP4J是向前發展,但其未能遵循; [echo] CRAP4J_HOME = C:\ Utils \ crap4j [crap4j] java.lang.IllegalArgumentException:找不到Crap4j Home! [crap4j] at org.crap4j.Main.getCrap4jHomeFromClass(Main.java:126) CRAP4J_HOME在我的環境中正確設置! – SJunejo
請使用編輯功能(問題下方的編輯按鈕)進行更新 – oers