File: build.xml

package info (click to toggle)
jruby 9.3.9.0%2Bds-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 80,856 kB
  • sloc: ruby: 517,823; java: 260,094; xml: 31,930; ansic: 5,777; yacc: 4,973; sh: 1,163; makefile: 105; jsp: 48; tcl: 40; exp: 11
file content (65 lines) | stat: -rw-r--r-- 3,042 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<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>