Skip to content

Instantly share code, notes, and snippets.

@vexus2
Created October 11, 2012 01:27
Show Gist options
  • Save vexus2/3869592 to your computer and use it in GitHub Desktop.
Save vexus2/3869592 to your computer and use it in GitHub Desktop.
[xml]Jenkins用のbuild.xml phpcpd/phpmd/phpunit/phpdoc使用
<?xml version="1.0" encoding="utf-8" ?>
<project name="auoneLibrary" basedir="." default="all">
<property name="outputDir" value="."/>
<target name="phpcpd">
<phpcpd minTokens="10">
<fileset dir="./application/">
<include name="**/*.php"/>
<exclude name="library/lwopenid/**/*.php"/>
</fileset>
<formatter type="pmd"
outfile="${outputDir}/cpd.xml"/>
</phpcpd>
</target>
<target name="phpmd">
<phpmd rulesets="ruleset.xml">
<fileset dir="./application">
<exclude name="library/lwopenid/**/*.php"/>
</fileset>
<formatter type="xml"
outfile="${outputDir}/pmd.xml"/>
</phpmd>
</target>
<target name="phpunit">
<mkdir dir="coverage" />
<exec command="phpunit -c tests/phpunit.xml" logoutput="true" />
</target>
<target name="phpdoc">
<mkdir dir="phpdoc" />
<phpdoc title="API Documentation"
destdir="./phpdoc"
output="HTML:Smarty:PHP">
<fileset dir="./application"></fileset>
</phpdoc>
</target>
<target name="all" depends="phpcpd,phpmd,phpunit,phpdoc"></target>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment