Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
66 lines (55 sloc) 2.97 KB
<project xmlns:ivy="antlib:org.apache.ivy.ant">
<property name="ivy.install.version" value="2.0.0" />
<property name="ivy.jar.dir" value="${user.home}/.ivy2" />
<property name="ivy.jar.file" value="${ivy.jar.dir}/ivy-${ivy.install.version}.jar" />
<property name="jsch.install.version" value="0.1.29" />
<property name="jsch.jar.file" value="${ivy.jar.dir}/jsch-${jsch.install.version}.jar" />
<!--
download ivy from the web site so that it can be used without being
installed. if the file has already been downloaded, we use a rename
trick to avoid hitting the website again. (that would be annoying
when building offline.)
-->
<target name="download-ivy" unless="skip.download">
<mkdir dir="${ivy.jar.dir}" />
<condition property="ivy.url" value="file:${ivy.jar.file}">
<available file="${ivy.jar.file}" />
</condition>
<property name="ivy.url" value="http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar" />
<get src="${ivy.url}" dest="${ivy.jar.file}.download" usetimestamp="true" />
<move file="${ivy.jar.file}.download" tofile="${ivy.jar.file}" />
<condition property="jsch.url" value="file:${jsch.jar.file}">
<available file="${jsch.jar.file}" />
</condition>
<property name="jsch.url" value="http://repo1.maven.org/maven2/jsch/jsch/${jsch.install.version}/jsch-${jsch.install.version}.jar" />
<get src="${jsch.url}" dest="${jsch.jar.file}.download" usetimestamp="true" />
<move file="${jsch.jar.file}.download" tofile="${jsch.jar.file}" />
</target>
<!-- import ivy's ant tasks -->
<target name="install-ivy" depends="download-ivy">
<path id="ivy.lib.path">
<fileset dir="${ivy.jar.dir}" includes="ivy-${ivy.install.version}.jar" />
</path>
<taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path" />
</target>
<!-- where to look for the ivy config -->
<property name="ivy.dep.file" value="${basedir}/ivy/ivy.xml" />
<property name="ivy.settings.file" value="${basedir}/ivy/ivysettings.xml" />
<target name="findbugs" depends="install-ivy" description="Run Findbugs on JRuby source">
<!--
TODO move this out into a target that can be dependended on, and introduce code coverage,
cyclomatic complexity and any other metrics that you want to include.
-->
<ivy:resolve conf="check" />
<ivy:cachepath pathid="check.path" conf="check" />
<taskdef name="findbugs" classpathref="check.path" classname="edu.umd.cs.findbugs.anttask.FindBugsTask"/>
<findbugs classpathref="check.path" pluginList="" output="html" outputfile="${basedir}/jruby-findbugs.html"
excludefilter="${basedir}/findbugs.xml" jvmargs="-Xmx1024M">
<sourcepath path="${basedir}/source" />
<class location="${jruby.classes.dir}" />
<auxclasspath>
<path refid="build.classpath" />
</auxclasspath>
</findbugs>
</target>
</project>
Something went wrong with that request. Please try again.