Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 2.96 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <project name="vsc4" default="build" basedir=".">
  3.  
  4.     <property name="source" location="${basedir}/" />
  5.  
  6.     <target name="clean">
  7.         <!-- Clean up -->
  8.         <delete dir="${basedir}/build" />
  9.  
  10.         <!-- Create build directories -->
  11.         <mkdir dir="${basedir}/build/api" />
  12.         <mkdir dir="${basedir}/build/code-browser" />
  13.         <mkdir dir="${basedir}/build/coverage" />
  14.         <mkdir dir="${basedir}/build/logs" />
  15.         <mkdir dir="${basedir}/build/pdepend" />
  16.     </target>
  17.  
  18.     <!-- Run unit tests and generate junit.xml and clover.xml -->
  19.     <target name="phpunit">
  20.         <exec executable="cmd">
  21.             <arg line="/c phpunit '${basedir}/test'" />
  22.         </exec>    
  23.     </target>
  24.  
  25.     <!--
  26.         Run the pdepend, phpmd, phpcpd, phpcs, phpdoc and phploc tasks in
  27.         parallel using a maximum of 2 threads.
  28.     -->
  29.     <target name="parallelTasks">
  30.         <parallel threadCount="2">
  31.             <sequential>
  32.                 <antcall target="pdepend" />
  33.                 <antcall target="phpmd" />
  34.             </sequential>
  35.             <antcall target="phpcpd" />
  36.             <antcall target="phpcs" />
  37.             <antcall target="phpdoc" />
  38.             <antcall target="phploc" />
  39.         </parallel>
  40.     </target>
  41.  
  42.     <!-- Generate jdepend.xml and software metrics charts -->
  43.     <target name="pdepend">
  44.         <exec executable="cmd">
  45.             <arg line="/c pdepend --jdepend-xml='${basedir}/build/logs/jdepend.xml'
  46.              --jdepend-chart='${basedir}/build/pdepend/dependencies.svg'
  47.              --overview-pyramid='${basedir}/build/pdepend/overview-pyramid.svg'
  48.              
  49.              '${source}'" />
  50.         </exec>
  51.     </target>
  52.  
  53.     <!-- Generate pmd.xml -->
  54.     <target name="phpmd">
  55.         <exec executable="cmd">
  56.             <arg line="/c phpmd '${source}'
  57.              xml
  58.              codesize,design,naming,unusedcode
  59.              --reportfile '${basedir}/build/logs/pmd.xml'" />
  60.         </exec>
  61.     </target>
  62.  
  63.     <!-- Generate pmd-cpd.xml -->
  64.     <target name="phpcpd">
  65.         <exec executable="cmd">
  66.             <arg line="/c phpcpd --log-pmd '${basedir}/build/logs/pmd-cpd.xml'
  67.              '${source}'" />
  68.         </exec>
  69.     </target>
  70.  
  71.     <!-- Generate phploc.csv -->
  72.     <target name="phploc">
  73.         <exec executable="cmd">
  74.             <arg line="/c phploc --log-csv '${basedir}/build/logs/phploc.csv'
  75.              '${source}'" />
  76.         </exec>
  77.     </target>
  78.  
  79.     <!-- Generate checkstyle.xml -->
  80.     <target name="phpcs">
  81.         <exec executable="cmd">
  82.             <arg line="/c phpcs --report=checkstyle
  83.              --report-file='${basedir}/build/logs/checkstyle.xml'
  84.              --standard=PEAR
  85.              '${source}'" />
  86.         </exec>
  87.     </target>
  88.  
  89.     <!-- Generate API documentation -->
  90.     <target name="phpdoc">
  91.         <exec executable="cmd">
  92.             <arg
  93.                 line="/c phpdoc --directory '${source}'
  94.                 --target    '${basedir}/build/api'" />
  95.         </exec>
  96.     </target>
  97.  
  98.     <target name="phpcb">
  99.         <exec executable="cmd">
  100.             <arg line="/c phpcb --log    '${basedir}/build/logs'
  101.              --output '${basedir}/build/code-browser'" />
  102.         </exec>
  103.     </target>
  104.  
  105.     <target name="build" depends="clean,parallelTasks,phpunit,phpcb" />
  106. </project>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement