Ignore rules for git users
[stereo.git] / build.xml
bloba4253d925d1a54ea65fe7a3c377ff8b348789d33
1 <?xml version="1.0" encoding="UTF-8"?>
3 <project basedir="." default="build" name="Stereo" xmlns:ivy="antlib:org.apache.ivy.ant">
5   <property name="lib.dir" value="lib"/>
7   <property name="Amp.location" value="Amp"/>
8   <property name="Asunder.location" value="Asunder"/>
9   <property name="DAAPClient.location" value="DAAPClient"/>
10   <property name="DACPServer.location" value="DACPServer"/>
11   <property name="MemphisDJ.location" value="MemphisDJ"/>
13   <path id="Stereo.classpath">
14     <pathelement location="Amp/bin"/>
15     <pathelement location="Asunder/bin"/>
16     <pathelement location="DAAPClient/bin"/>
17     <pathelement location="DACPServer/bin"/>
18     <pathelement location="MemphisDJ/bin"/>
19     <fileset dir="${lib.dir}">
20       <include name="**/*.jar"/>
21     </fileset>
22   </path>
24   <target name="init" depends="resolve">
25     <mkdir dir="bin"/>
26   </target>
28   <target depends="build-subprojects,build-project" name="build"/>
30   <target name="build-subprojects">
31     <ant antfile="${MemphisDJ.location}/build.xml" inheritAll="false" target="build-project"/>
32     <ant antfile="${DAAPClient.location}/build.xml" inheritAll="false" target="build-project"/>
33     <ant antfile="${Asunder.location}/build.xml" inheritAll="false" target="build-project"/>
34     <ant antfile="${DACPServer.location}/build.xml" inheritAll="false" target="build-project"/>
35     <ant antfile="${Amp.location}/build.xml" inheritAll="false" target="build-project"/>
36   </target>
38   <target name="clean">
39     <delete dir="bin"/>    
40     <ant antfile="${Amp.location}/build.xml" inheritAll="false" target="clean"/>
41     <ant antfile="${Asunder.location}/build.xml" inheritAll="false" target="clean"/>
42     <ant antfile="${DAAPClient.location}/build.xml" inheritAll="false" target="clean"/>
43     <ant antfile="${DACPServer.location}/build.xml" inheritAll="false" target="clean"/>
44     <ant antfile="${MemphisDJ.location}/build.xml" inheritAll="false" target="clean"/>
45   </target>
47   <target depends="init" name="build-project">
48     <echo message="${ant.project.name}: ${ant.file}"/>
49     <echo file="bin/stereo.sh" message="#!/bin/bash${line.separator}${line.separator}
50         ${java.home}/bin/java
51                 -cp ${toString:Stereo.classpath}
52                 Main $*
53         ${line.separator}"/>
54     <echo file="bin/amp.sh" message="#!/bin/bash${line.separator}${line.separator}
55         ${java.home}/bin/java
56                 -cp ${toString:Stereo.classpath}
57                 stereo.player.Main $*
58         ${line.separator}"/>
59     <exec executable="chmod">
60       <arg line="755 bin/stereo.sh bin/amp.sh"/>
61     </exec>
62   </target>
64   <property name="ivy.install.version" value="2.0.0"/>
65   <available file="${lib.dir}/ivy.jar" property="ivy.available"/>
66   <target name="download-ivy" unless="ivy.available">
67     <!-- download Ivy from web site so that it can be used even without any special installation -->
68     <echo message="installing ivy..."/>
69     <mkdir dir="${lib.dir}"/>
70     <get src="http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar"
71           dest="${lib.dir}/ivy.jar" usetimestamp="true"/>
72   </target>
73   
74   <target name="install-ivy" depends="download-ivy">
75     <path id="ivy.lib.path">
76       <fileset dir="${lib.dir}" includes="*.jar"/>
77     </path>
78     <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
79   </target>
80   
81   <target name="resolve" depends="install-ivy">
82     <ivy:settings file="ivysettings.xml" />
83     <ivy:retrieve />
84   </target>
86 </project>