108 lines
3.3 KiB
XML
108 lines
3.3 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<project name="dolibarr" default="hudson" basedir=".">
|
|
<target name="clean">
|
|
<!-- Clean up -->
|
|
<delete dir="${basedir}/hudson"/>
|
|
|
|
<!-- Create build directories -->
|
|
<mkdir dir="${basedir}/hudson/api"/>
|
|
<mkdir dir="${basedir}/hudson/doxygen"/>
|
|
<mkdir dir="${basedir}/hudson/code-browser"/>
|
|
<mkdir dir="${basedir}/hudson/coverage"/>
|
|
<mkdir dir="${basedir}/hudson/logs"/>
|
|
<mkdir dir="${basedir}/hudson/pdepend"/>
|
|
</target>
|
|
|
|
<!-- Run unit tests and generate junit.xml and clover.xml -->
|
|
<target name="phpunit">
|
|
<exec dir="${basedir}" executable="phpunit" failonerror="true">
|
|
<arg line="--configuration test/phpunit/hudson-phpunit.xml" />
|
|
</exec>
|
|
</target>
|
|
|
|
<!-- Run pdepend, phpmd, phpcpd, phpcs, phpdoc and phploc in parallel -->
|
|
<target name="parallelTasks">
|
|
<parallel>
|
|
<antcall target="pdepend"/>
|
|
<antcall target="phpmd"/>
|
|
<antcall target="phpcpd"/>
|
|
<antcall target="phpcs"/>
|
|
<antcall target="doxygen"/>
|
|
<antcall target="phploc"/>
|
|
</parallel>
|
|
</target>
|
|
|
|
<!-- Generate jdepend.xml and software metrics charts -->
|
|
<target name="pdepend">
|
|
<exec executable="pdepend">
|
|
<arg line="--jdepend-xml='${basedir}/hudson/logs/jdepend.xml'
|
|
--jdepend-chart='${basedir}/hudson/pdepend/dependencies.svg'
|
|
--summary-xml='${basedir}/hudson/logs/jdepend-summary.xml'
|
|
--overview-pyramid='${basedir}/hudson/pdepend/overview-pyramid.svg'
|
|
--ignore='${basedir}/htdocs/includes'
|
|
htdocs
|
|
" />
|
|
</exec>
|
|
</target>
|
|
|
|
<!-- Generate pmd.xml -->
|
|
<target name="phpmd">
|
|
<exec executable="phpmd">
|
|
<arg line="htdocs xml codesize,unusedcode
|
|
--reportfile '${basedir}/hudson/logs/pmd.xml'
|
|
--exclude '${basedir}/htdocs/includes'
|
|
" />
|
|
</exec>
|
|
</target>
|
|
|
|
<!-- Generate pmd-cpd.xml -->
|
|
<target name="phpcpd">
|
|
<exec executable="phpcpd">
|
|
<arg line="--log-pmd '${basedir}/hudson/logs/pmd-cpd.xml'
|
|
--exclude '${basedir}/htdocs/includes'
|
|
htdocs
|
|
" />
|
|
</exec>
|
|
</target>
|
|
|
|
<!-- Generate phploc.csv -->
|
|
<target name="phploc">
|
|
<exec executable="phploc">
|
|
<arg line="--log-csv '${basedir}/hudson/logs/phploc.csv'
|
|
--exclude '${basedir}/htdocs/includes'
|
|
htdocs
|
|
" />
|
|
</exec>
|
|
</target>
|
|
|
|
<!-- Generate checkstyle.xml -->
|
|
|
|
<target name="phpcs">
|
|
<exec executable="phpcs" dir="${basedir}" output="${basedir}/hudson/logs/checkstyle.xml">
|
|
<arg line=" --standard=${basedir}/dev/codesniffer/ruleset.xml
|
|
--ignore=${basedir}/htdocs/includes
|
|
--report=checkstyle
|
|
htdocs
|
|
"/>
|
|
</exec>
|
|
</target>
|
|
|
|
<!-- Generate API documentation -->
|
|
<target name="doxygen" description="Dolibarr documentation" >
|
|
<exec executable="doxygen" dir="${basedir}" failonerror="false">
|
|
<arg value="${basedir}/build/doxygen/hudson-doxygen.doxyfile"/>
|
|
</exec>
|
|
</target>
|
|
|
|
<target name="phpcb">
|
|
<exec executable="phpcb">
|
|
<arg line="--log '${basedir}/hudson/logs'
|
|
--source '${basedir}/htdocs'
|
|
--output '${basedir}/hudson/code-browser'
|
|
--ignore '${basedir}/htdocs/includes'
|
|
" />
|
|
</exec>
|
|
</target>
|
|
|
|
<target name="hudson" depends="clean,parallelTasks,phpunit,phpcb"/>
|
|
</project> |