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="DAAPLib.java.library.path" value="/usr/local/lib/jni"/>
9 <property name="debuglevel" value="source,lines,vars"/>
11 <property name="target" value="1.5"/>
12 <property name="source" value="1.5"/>
14 <property name="ivy.install.version" value="2.0.0-beta2"/>
16 <available file="lib/ivy.jar" property="ivy.available" />
18 <target name="download-ivy" unless="ivy.available">
19 <!-- download Ivy from web site so that it can be used even without any special installation -->
20 <echo message="installing ivy..."/>
22 <get src="http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar"
23 dest="lib/ivy.jar" usetimestamp="true"/>
26 <target name="install-ivy" depends="download-ivy">
27 <path id="ivy.lib.path">
28 <fileset dir="lib" includes="*.jar"/>
30 <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
33 <target name="resolve" depends="install-ivy">
34 <ivy:settings file="../ivysettings.xml" />
38 <path id="MemphisDJ.classpath">
39 <pathelement location="${MemphisDJ.location}/bin"/>
41 <path id="Asunder.classpath">
42 <pathelement location="${Asunder.location}"/>
44 <path id="DAAPLib.classpath">
45 <pathelement location="bin"/>
47 <include name="**/*.jar"/>
49 <path refid="MemphisDJ.classpath"/>
50 <path refid="Asunder.classpath"/>
51 <pathelement location="/usr/local/share/java/dbus.jar"/>
52 <pathelement location="/usr/local/share/java/unix.jar"/>
53 <pathelement location="/usr/local/share/java/debug-disable.jar"/>
56 <target name="init" depends="resolve">
58 <copy includeemptydirs="false" todir="bin">
59 <fileset dir="src" excludes="**/*.launch, **/*.java"/>
61 <copy includeemptydirs="false" todir="bin">
62 <fileset dir="test" excludes="**/*.launch, **/*.java"/>
68 <target depends="clean" name="cleanall">
69 <ant antfile="${MemphisDJ.location}/build.xml" inheritAll="false" target="clean"/>
71 <target depends="build-subprojects,build-project" name="build">
72 <echo file="run.sh" message="#!/bin/sh${line.separator}${line.separator}${java.home}/bin/java -cp ${toString:DAAPLib.classpath} -Djava.library.path=${DAAPLib.java.library.path} dacp.Main $* ${line.separator}" />
73 <exec executable="chmod">
74 <arg line="755 run.sh"/>
78 <target name="build-subprojects">
79 <ant antfile="${MemphisDJ.location}/build.xml" inheritAll="false" target="build-project"/>
80 <ant antfile="${Asunder.location}/build.xml" inheritAll="false" target="build-project"/>
82 <target depends="init" name="build-project">
83 <echo message="${ant.project.name}: ${ant.file}"/>
84 <javac debug="true" debuglevel="${debuglevel}" destdir="bin" source="${source}" target="${target}">
86 <classpath refid="DAAPLib.classpath"/>
88 <javac debug="true" debuglevel="${debuglevel}" destdir="bin" source="${source}" target="${target}">
90 <classpath refid="DAAPLib.classpath"/>
93 <target description="Build all projects which reference this project. Useful to propagate changes." name="build-refprojects">
94 <ant antfile="${CLI.location}/build.xml" inheritAll="false" target="clean"/>
95 <ant antfile="${CLI.location}/build.xml" inheritAll="false" target="build"/>
96 <ant antfile="${Asunder.location}/build.xml" inheritAll="false" target="clean"/>
97 <ant antfile="${Asunder.location}/build.xml" inheritAll="false" target="build"/>
99 <target name="DAAPConstants">
100 <java classname="daap.DAAPConstants" failonerror="true" fork="yes">
101 <classpath refid="DAAPLib.classpath"/>
104 <target name="DACPConstants">
105 <java classname="util.DACPConstants" failonerror="true" fork="yes">
106 <classpath refid="DAAPLib.classpath"/>
110 <java classname="dacp.Main" failonerror="true" fork="yes">
111 <classpath refid="DAAPLib.classpath"/>
114 <target name="QueryParser">
115 <java classname="util.queryparser.QueryParser" failonerror="true" fork="yes">
116 <classpath refid="DAAPLib.classpath"/>