2012-12-19 63 views
1

在我的buildfile中,我使用phploc,如jenkins-php.org所述,但它不會忽略文件夾。爲什麼phploc忽略螞蟻排除

<target name="phploc" description="Measure project size using PHPLOC"> 
    <exec executable="phploc"> 
     <arg value="--log-csv" /> 
     <arg value="${basedir}/build/logs/phploc.csv" /> 
     <arg value="--exclude"/> 
     <arg value="${basedir}/include/library" /> 
     <arg path="${basedir}"/> 
    </exec> 
</target> 

它的工作原理與此命令在控制檯上的項目目錄:

phploc --log-csv build/logs/phploc.csv --exclude include/library . 

但爲什麼不能在我的構建文件?它始終貫穿於庫下的整個Zend庫。

哦,phpcpd是同樣的問題。在控制檯它是正確的,有螞蟻不運行它...

回答

2

我猜在這裏,但在你的命令行運行您在Ant使用

--exclude include/library 

而構建文件,你有

<arg value="--exclude"/> 
<arg value="${basedir}/include/library" /> 

basedir一套有效

--exclude ${basedir}/include/library 

是,無論你有。

也許嘗試

<arg value="--exclude"/> 
<arg value="include/library" /> 

代替。

+0

你完全正確。看來,我不需要在--exclude值中使用basedir參數phploc和phpcpd,thx – spankmaster79