Hi I'm setting up Jenkins with a Pdepend target in my build
but when I test individually ant pdepend
it keeps producing a bug
Unknown option开发者_开发问答 'Files\Jenkins\jobs\testdemo\workspace/build/logs/jdepend.xml' given
I don't know if I'm supposed to build this file myself ? or let it be generated ? but it simply won't go through the pdepend test any explantion is more than welcome
my build target
<target name="pdepend">
<exec dir="${basedir}/src"
executable="pdepend.bat"
failonerror="false">
<arg line="--jdepend-xml=${basedir}/build/logs/jdepend.xml
--jdepend-chart=${basedir}/build/pdepend/dependencies.svg
--overview-pyramid=${basedir}/build/pdepend/overview-pyramid.svg ."/>
</exec>
</target>
The problem you have here is that your ${basedir}
string has a path name that includes a string (ie presumably "Program Files"). You'll note that the error message starts with "Files\Jenkins\"etc etc.
What has happened is that this ${basedir}
string has been substituted into the argument string, but because of the space it produces invalid syntax in pdepend's command line.
To fix this problem, you need to quote or escape the path string, exactly as you'd do if you were entering the path into the command line manually.
Something like this should fix it:
<arg line='--jdepend-xml="${basedir}/build/logs/jdepend.xml"
--jdepend-chart="${basedir}/build/pdepend/dependencies.svg"
--overview-pyramid="${basedir}/build/pdepend/overview-pyramid.svg" .'/>
either that, or run Jenkins from a path that doesn't include any spaces.
Hope that helps.
精彩评论