Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Sample build.xml to use oclint for PMD analysis in Jenkins. See the post mentioned in the first comment for details.
<?xml version="1.0" encoding="UTF-8"?>
<project name="fooProject" default="build-fooProject">
<property environment="env"/>
<target name="build-fooProject" depends="prepare,oclint" />
<target name="clean" description="Cleanup build artifacts">
<delete dir="${basedir}/build/oclint" />
<target name="prepare" depends="clean" description="Prepare for build">
<mkdir dir="${basedir}/build/oclint" />
<target name="oclint">
<antcall target="xcodebuild-clean" />
<antcall target="xcodebuild" />
<antcall target="oclint-xcodebuild" />
<antcall target="oclint-parse" />
<target name="xcodebuild-clean">
<exec executable="xcodebuild">
<arg value="-configuration" />
<arg value="Release" />
<arg value="clean" />
<target name="xcodebuild">
<exec executable="xcodebuild" output="xcodebuild.log">
<arg value="-configuration" />
<arg value="Release" />
<arg value="-arch" />
<arg value="armv7" />
<arg value="CODE_SIGN_IDENTITY=" />
<target name="oclint-xcodebuild">
<exec executable="PATH_TO_oclint-release/bin/oclint-xcodebuild" />
<target name="oclint-parse">
<exec executable="PATH_TO_oclint-release/bin/oclint-json-compilation-database">
<env key="PATH" value="${env.PATH}:PATH_TO_oclint-release/bin/"/>
<arg value="--" />
<arg value="-o=${basedir}/build/oclint/lint.xml" />
<arg value="-report-type=pmd" />
<arg value="-stats" />

This comment has been minimized.

Show comment
Hide comment

maplesteve commented Mar 10, 2013

Details: blog post

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment