1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
---|
2 | <project basedir="." default="dist" name="Crosspare">
|
---|
3 | <!-- General Properties -->
|
---|
4 | <property environment="env" />
|
---|
5 | <property name="build.location" value="bin" />
|
---|
6 | <property name="dist.location" value="dist" />
|
---|
7 | <property name="javadoc.location" value="javadoc" />
|
---|
8 | <property name="downloads.location" value="downloads" />
|
---|
9 | <property name="debuglevel" value="source,lines,vars" />
|
---|
10 | <property name="target" value="1.7" />
|
---|
11 | <property name="source" value="1.7" />
|
---|
12 |
|
---|
13 | <!-- Crosspare Properties -->
|
---|
14 | <property name="Crosspare.jarname" value="crosspare.jar" />
|
---|
15 | <path id="Crosspare.classpath">
|
---|
16 | <pathelement location="${build.location.eventbenchconsole}" />
|
---|
17 | <pathelement location="lib/commons-collections4-4.0-alpha1.jar" />
|
---|
18 | <pathelement location="lib/commons-io-2.4.jar" />
|
---|
19 | <pathelement location="lib/commons-math3-3.1.jar" />
|
---|
20 | <pathelement location="lib/java-utils-0.0.1.jar" />
|
---|
21 | <pathelement location="lib/weka.jar" />
|
---|
22 | </path>
|
---|
23 |
|
---|
24 | <!-- Initialization Targets -->
|
---|
25 | <target name="init.build">
|
---|
26 | <mkdir dir="${build.location}" />
|
---|
27 | </target>
|
---|
28 | <target name="init.dist">
|
---|
29 | <mkdir dir="${dist.location}" />
|
---|
30 | </target>
|
---|
31 | <target name="init.downloads">
|
---|
32 | <mkdir dir="${downloads.location}" />
|
---|
33 | </target>
|
---|
34 | <target name="init.javadoc">
|
---|
35 | <mkdir dir="${javadoc.location}" />
|
---|
36 | </target>
|
---|
37 |
|
---|
38 | <!-- Clean-up Targets -->
|
---|
39 | <target name="clean.build">
|
---|
40 | <delete dir="${build.location}" />
|
---|
41 | </target>
|
---|
42 | <target name="clean.dist">
|
---|
43 | <delete dir="${dist.location}" />
|
---|
44 | </target>
|
---|
45 | <target name="clean.javadoc">
|
---|
46 | <delete dir="${javadoc.location}" />
|
---|
47 | </target>
|
---|
48 | <target depends="clean.build,clean.dist,clean.javadoc" name="clean.all" />
|
---|
49 |
|
---|
50 | <!-- Build Targets -->
|
---|
51 | <target depends="init.build" name="build">
|
---|
52 | <javac debug="true" debuglevel="${debuglevel}"
|
---|
53 | destdir="${build.location}" source="${source}"
|
---|
54 | target="${target}" includeantruntime="false">
|
---|
55 | <src path="src" />
|
---|
56 | <classpath refid="Crosspare.classpath" />
|
---|
57 | </javac>
|
---|
58 | </target>
|
---|
59 |
|
---|
60 | <!-- Distribution Targets -->
|
---|
61 | <target depends="build,init.dist,javadoc" name="dist">
|
---|
62 | <!-- dist of main components, i.e., the console -->
|
---|
63 | <pathconvert property="dist.libs" pathsep=" ">
|
---|
64 | <mapper>
|
---|
65 | <chainedmapper>
|
---|
66 | <flattenmapper />
|
---|
67 | <globmapper from="*" to="lib/*" />
|
---|
68 | </chainedmapper>
|
---|
69 | </mapper>
|
---|
70 | <path>
|
---|
71 | <fileset dir="lib">
|
---|
72 | <include name="**/*.jar" />
|
---|
73 | </fileset>
|
---|
74 | </path>
|
---|
75 | </pathconvert>
|
---|
76 | <property name="dist.classpath" value="${dist.libs}"></property>
|
---|
77 | <jar destfile="${dist.location}/${Crosspare.jarname}" basedir="${build.location}">
|
---|
78 | <manifest>
|
---|
79 | <attribute name="Built-By" value="${user.name}" />
|
---|
80 | <attribute name="Main-Class" value="de.ugoe.cs.cpdp.Runner" />
|
---|
81 | <attribute name="Class-Path" value="${dist.classpath}" />
|
---|
82 | </manifest>
|
---|
83 | </jar>
|
---|
84 | <copy includeemptydirs="false" todir="${dist.location}/lib">
|
---|
85 | <fileset dir="lib" />
|
---|
86 | </copy>
|
---|
87 |
|
---|
88 | <!-- copy Javadoc to dist -->
|
---|
89 | <copy includeemptydirs="false" todir="${dist.location}/javadoc">
|
---|
90 | <fileset dir="${javadoc.location}" />
|
---|
91 | </copy>
|
---|
92 | </target>
|
---|
93 |
|
---|
94 |
|
---|
95 | <target depends="init.downloads,dist" name="createDownloads">
|
---|
96 | <zip destfile="${downloads.location}/crosspare.zip">
|
---|
97 | <fileset dir="${dist.location}" />
|
---|
98 | </zip>
|
---|
99 | </target>
|
---|
100 |
|
---|
101 | <!-- Javadoc Targets -->
|
---|
102 | <target depends="init.javadoc" name="javadoc"
|
---|
103 | description="o Create Javadocs (Requires Javadoc 1.4+)">
|
---|
104 | <javadoc destdir="${javadoc.location}"
|
---|
105 | additionalparam="-J-Dorg.apache.commons.attributes.javadoc.CATaglet.sources=${basedir}">
|
---|
106 | <classpath refid="Crosspare.classpath" />
|
---|
107 | <link href="http://download.oracle.com/javase/7/docs/api/" />
|
---|
108 | <fileset dir="src" includes="**/*.java" />
|
---|
109 | </javadoc>
|
---|
110 | </target>
|
---|
111 | </project>
|
---|