1 <?xml version="1.0" encoding="UTF-8"?>
2 <project basedir="." default="build" name="DAAPLib" xmlns:ivy="antlib:org.apache.ivy.ant">
3 <property name="CLI.location" value="../CLI"/>
4 <property name="Asunder.location" value="../Asunder"/>
5 <property name="MemphisDJ.location" value="../MemphisDJ"/>
7 <property name="debuglevel" value="source,lines,vars"/>
9 <property name="target" value="1.5"/>
10 <property name="source" value="1.5"/>
12 <property name="ivy.install.version" value="2.0.0-beta2"/>
14 <available file="lib/ivy.jar" property="ivy.available" />
16 <target name="download-ivy" unless="ivy.available">
17 <!-- download Ivy from web site so that it can be used even without any special installation -->
18 <echo message="installing ivy..."/>
20 <get src="http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar"
21 dest="lib/ivy.jar" usetimestamp="true"/>
24 <target name="install-ivy" depends="download-ivy">
25 <path id="ivy.lib.path">
26 <fileset dir="lib" includes="*.jar"/>
28 <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
31 <target name="resolve" depends="install-ivy">
32 <ivy:settings file="../ivysettings.xml" />
36 <path id="MemphisDJ.classpath">
37 <pathelement location="${MemphisDJ.location}/bin"/>
39 <path id="Asunder.classpath">
40 <pathelement location="${Asunder.location}"/>
42 <path id="DAAPLib.classpath">
43 <pathelement location="bin"/>
45 <include name="**/*.jar"/>
47 <path refid="MemphisDJ.classpath"/>
48 <path refid="Asunder.classpath"/>
50 <target name="init" depends="resolve">
52 <copy includeemptydirs="false" todir="bin">
53 <fileset dir="src" excludes="**/*.launch, **/*.java"/>
55 <copy includeemptydirs="false" todir="bin">
56 <fileset dir="test" excludes="**/*.launch, **/*.java"/>
62 <target depends="clean" name="cleanall">
63 <ant antfile="${MemphisDJ.location}/build.xml" inheritAll="false" target="clean"/>
65 <target depends="build-subprojects,build-project" name="build">
66 <echo file="run.sh" message="#!/bin/sh${line.separator}${line.separator}${java.home}/bin/java -cp ${toString:DAAPLib.classpath} dacp.Main $* ${line.separator}" />
67 <exec executable="chmod">
68 <arg line="755 run.sh"/>
72 <target name="build-subprojects">
73 <ant antfile="${MemphisDJ.location}/build.xml" inheritAll="false" target="build-project"/>
74 <ant antfile="${Asunder.location}/build.xml" inheritAll="false" target="build-project"/>
76 <target depends="init" name="build-project">
77 <echo message="${ant.project.name}: ${ant.file}"/>
78 <javac debug="true" debuglevel="${debuglevel}" destdir="bin" source="${source}" target="${target}">
80 <classpath refid="DAAPLib.classpath"/>
82 <javac debug="true" debuglevel="${debuglevel}" destdir="bin" source="${source}" target="${target}">
84 <classpath refid="DAAPLib.classpath"/>
87 <target description="Build all projects which reference this project. Useful to propagate changes." name="build-refprojects">
88 <ant antfile="${CLI.location}/build.xml" inheritAll="false" target="clean"/>
89 <ant antfile="${CLI.location}/build.xml" inheritAll="false" target="build"/>
90 <ant antfile="${Asunder.location}/build.xml" inheritAll="false" target="clean"/>
91 <ant antfile="${Asunder.location}/build.xml" inheritAll="false" target="build"/>
93 <target name="DAAPConstants">
94 <java classname="daap.DAAPConstants" failonerror="true" fork="yes">
95 <classpath refid="DAAPLib.classpath"/>
98 <target name="DACPConstants">
99 <java classname="util.DACPConstants" failonerror="true" fork="yes">
100 <classpath refid="DAAPLib.classpath"/>
104 <java classname="dacp.Main" failonerror="true" fork="yes">
105 <classpath refid="DAAPLib.classpath"/>
108 <target name="QueryParser">
109 <java classname="util.queryparser.QueryParser" failonerror="true" fork="yes">
110 <classpath refid="DAAPLib.classpath"/>